c# - Entity Framework .. partial constructor -


I intend to expand the creators of some entities in my unit framework (4).

However, how do I ensure that my constructor is being run after the model is running. That is, I want to make sure that the object holds data before data in my database.

There is no manufacturer other than the default manufacturer; The objects are made through a factory method, and are only started after the construction.

You can write your own default constructor, and the generated code will call all generated properties before initiating it. If you write your own non-default constructor, you will also have to write your own default constructor, otherwise the designer file will not be compiled because it assumes that a default constructor is present.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -