I have a view that has an Int column, which is null (let's call it StackOverflowCount). When creating an EF model from a database, the EF designer does not recognize it as NULL and creates a column as Int.
The problem is that in the EF designer, I set the column to Nullable, and the next error then destroys the compilation;
Error 3031: Problem in mapping fragments starting at line 2327: Non-nullable column MyView.StackOverflowCount in table MyView is mapped to a nullable entity property.
I can get around this by opening the .edmx file in XML mode and manually editing the definition of the SQL column, but there is no way to do this using the constructor, and it will be overwritten the next time you update from the model from the database.
Is this "by design" or an example of something that slipped into EF 4.0? I am using .Net 4.0 with EF 4.0 under VS 2010.
source share