entity framework custom data type mapping

后端 未结 2 588
傲寒
傲寒 2021-01-19 04:33

Given this code:

public class Car 
{
    public virtual int CarId { get; set; }
    public virtual string TypeName { get; set; }
    public ConvertableNullab         


        
2条回答
  •  太阳男子
    2021-01-19 04:54

    "Make sure that it is a valid primitive property" - clearly the problem lies with your Nullable workaround - why not just make it a nullable double?

    public class Car 
    {
        public virtual int CarId { get; set; }
        public virtual string TypeName { get; set; }
        public double? Price { get; set; }
    }
    

提交回复
热议问题