c# - Adding behavior to EF Entity classes -
To define an entity framework - the serializable class (EF code first) gives us the public virtual properties of data holders Need to be used in the form, which will later be used as a column in DB, it prevents the developer from initializing the instances of a unit from a producer, I want my institutions not to be Data "methods of getting the bucket", but also behavior, such as manipulation of data within the constructor Institeshn and object to the new object.
I think I can have ways, but what should I do to overcome the controller limit? Should I present the wrapper class, which will institute a property property-property and use it instead?
You can have the methods "as you want", as well as the properties of the Will not be mapped in DB or properties containing Note: Only navigation properties (references and archives) should be virtual to load lazy. Not antique I think this is a NHnibernate requirement. For the constructor, you can add as many parametric constructors as you want, you still have to have any parameters. By the way, you can also use object anchors. NotMappedAttribute , which will not be mapped ...
var test = new test {name = bla, code = 2};
Comments
Post a Comment