In an article i have read about changing serialization mode to unidirectional in Linq to SQL, I want to change serialization mode to Unidirectional in entity framework in order to use serialized entity framework objects on client side using WCF service. Guide me please.
相关问题
- Json.NET deserializing contents of a JObject?
- Entity Framework Code First Migration
- Entity Framework throws exception - Network Relate
- How to make a .svc file write to asp.net Trace.axd
- WCF Service Using Client Certificates Requires Ano
相关文章
- WCF发布Windows服务 POST方式报错 GET方式没有问题 应该怎么解决?
-
EF6 DbSet
returns null in Moq - Entity Framework 4.3.1 failing to create (/open) a
- EF6 code first: How to load DbCompiledModel from E
- serializing a list of objects into a file in java
- XCopy or MOVE do not work when a WCF Service runs
- Why do I need a ToList() to avoid disposed context
- Code-First Add-Migration keeps adding the same col
Entity framework doesn't have such setting. This unidirectional configuration was for Linq-to-sql where it forced code generator to mark each entity with
[DataContract(IsReference=true)]
. Built-in EF code generator and T4 templates for EntityObjects or STEs do this automatically. If you want to use POCO T4 generator template for class generation you must modify template to mark every entity class with[DataContract(IsReference=true)]
and each property with[DataMember]
.