0

I have a model, developed with Entity Framework 6. I have defined default values for some properties (e.g., True for Property A of type Boolean). When I generate my Database from Model, the default values are not generated in the script. Is there any way for generating them?

Yvonnila
  • 635
  • 1
  • 5
  • 22
  • does the column get created as a boolean or bit in the database? – terrencep Aug 27 '19 at 14:44
  • @terribletp The column is created as bit – Yvonnila Aug 27 '19 at 14:48
  • well if it was code first, I'd tell you to set it to true in the constructor. I don't know if modifying the constructor is on the table for you. – terrencep Aug 27 '19 at 14:51
  • @terribletp actually no, because the code is generated automatically from the model. The Property _is_ set in the cunstructor, but I want it to be set also automatically in the database (or better to say, in the script, with which I generate the database tables). – Yvonnila Aug 27 '19 at 14:55

0 Answers0