Monday, April 8, 2013

[.NET] Adding POCO Entities in the WCF mix

When you want to separate the domain model such that it is now housed a separate project for other layers/projects to use, you must remove proxy creation and assign the domain object and properties with DataContracts and DataMember attributes.

To remove proxy creation, simply put in the service implementation constructor

DBcontext.ContextOptions.ProxyCreationEnabled = false

No comments:

Post a Comment