I got this issue in the following case:
We had a column that was of type INT
and allowed NULL
(in SQL Server DB). However, the entity property was only int
.
We changed public int col { get; set; }
to public int? col { get; set; }
to fix issue.