Reputation: 291
I have problem with Entity Framework.
I have a table Victor
with 3 nullable columns. When the wizard is finished, I can't see the nullable columns inside the CreateVictor()
method, this method automatically is being generated by wizard not me.
After 4 hours I couldn't find any solution. This happens just for nullable column.
Upvotes: 1
Views: 224
Reputation: 2342
This is a 'feature' rather than a bug. The idea is that only the non-null columns are required to create a 'Victor'. So they are the only columns included in the CreateVictor() method.
If you want to set the other properties, you can do this with the object returned by CreateVictor().
var victor = Victor.CreateVictor(...);
victor.Name = "name";
Upvotes: 8