Hello,
In my database I add an int foreign key that was allow null values. I changed that so that it does not accept null values.
Since then, when I run my C# Winforms application, I get the exception:
Model1.msl(15,10) : error 3031: Problem in mapping fragments starting at line 15:Non-nullable column Addresses.addr_Contact_Id in table Addresses is mapped to a nullable entity property.
when I select data.
In my Model1.edmx file, I have used 'Update Model From Database ...'
--> no change
I checked the field in Model1.edmx, it has 'Nullable = none', so I changed it manually to 'Nullable = false'.
But when I do that all my datasources based on this edmx files say '[datasource] is no longer availble. Verify the class name is correct and the reference to this class is still valid.
So, how do I change the nullable state of a value in from the DB to the app ?
Thank you for your help.