-
-
Notifications
You must be signed in to change notification settings - Fork 353
z. Creating Core Entities
Nick Airdo edited this page Jul 29, 2015
·
4 revisions
- Create your EF Model under Rock.Model (See Entity Notes below)
- Build Rock
- Run the Rock.CodeGeneration program on the new entities.
- This should have updated the RockContext.cs
- Manually add the new classes to Visual Studio which will also add the references to the .csproj file.
- When ready, commit your changes and push.
- When you create new models, add the [DataMember] attribute to all of the entity properties and none of the virtual properties. Then, as you code blocks and need an object to serialize one or more of its virtual properties, add the [DataMember] attribute, but make sure that you never have both the parent and the child objects having each other’s referencing properties both with the [DataMember] attribute.