问题
I have developed my DAL using Entity Framework (Self Tracking Entities). I have written a WCF Service which exposes some CRUDE operations on those STEs.
I want to use my WCF service in a java application (client).
Would the STEs work properly in my Java Client Application? I mean if the java client application makes some changes in my self tracking entity, will those changes be tracked?
回答1:
No. STEs work only if you share assembly with their logic between server and client application. Once your client application is Java it cannot use your assembly with STE logic (with advanced interop it probably can but that is not solution for bad design of your service) so either Java developers must code the whole logic again or you must use plain POCOs / DTOs without this auto magic. WCF service exposing data sets or STEs is not interoperable because it demands certain logic implemented on clients.
Btw. we warned you about disadvantages of STEs!
来源:https://stackoverflow.com/questions/6818194/using-ste-entities-in-wcf-client-using-java-application-client