-
Notifications
You must be signed in to change notification settings - Fork 38
The Advantages of Cherry Picking with DataContractAttribute
fonlow edited this page Jun 1, 2017
·
1 revision
Firstly NewtonSoft.Json handles DataContractAttribute and related attributes very well.
It is a good practice to define most if not all data models in an assembly without other behavioral codes. And the assembly depends on only BCL, without depending on Entity Framework, MVC or NewtonSoft.Json.
You could easily support RPC, REST/HATEOAS, and WCF based on the same code base.
Opt-in is good for using the data models for multiple purposes:
- Serialization upon different medias.
- Entity Framework Code First.