Asp.Net Core Error: InvalidOperationException: The database generated a null value for non-nullable property 'PropertyName' of entity type 'EntityName'. Ensure value generation configuration in the database matches the configuration in the model

Problem: InvalidOperationException: The database generated a null value for non-nullable property 'PropertyName' of entity type 'EntityName'. Ensure value generation configuration in the database matches the configuration in the model.

Solution: Make sure that you DBContext has a DBSet<YourModalName> givenName {get;set;}
             - Also, make sure you read the documentation found at Microsoft's website LinkHere.


Edit this Article
asp.net Core 3.1 asp.net mvc asp.net core errors asp.net web forms asp.net core tutorial Technology published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy