My property allows values double
and values null
.
In the SQL Server Database it is set to decimal(18, 2)
.
But when seto some value (ex: 5.00
), it gives the error below.
Error:
The 'Valuation' property on 'Occurrence' could not be set to a 'System.Decimal' value. You should set this property to a non-null value of type 'System.Double'.
Model:
public class Ocorrencia
{
[Key]
public int id { get; set; }
public double? Avaliacao { get; set; }
}
How should it get to work properly?