Using Entity Framework, allow null attribute not updating in model
I'm using Entity Framework in Visual Studio and am working with an existing table and corresponding model. I have changed the table to allow null values for some attributes. However, when I try to update my model, it开发者_如何学Go doesn't pick up the change.
I'm going into the model designer, right clicking my model, and selecting "Update Model from Database". In the next window, I see my table in the Refresh tab, but selecting it still leaves the "Next" button below grayed out. I can only click "Finish".
Any ideas on why this is?
I'm using Entity Framework 4 (I think), MS Visual Web Developer 2010, and working with an ASP.Net 3.5 MVC 2 application.
Clicking Finish in this case will update the model. Updating the model will update the storage model but not necessarily the conceptual model, especially if you are doing a refresh and the property / entity is not being added for the first time. You might have to select the property that is nullable and under its properties set Nullable to true.
精彩评论