1. 可空类型 Decimal? 允许值为null,默认值为null 如:public Decimal? orderQuantity { get; set; } 默认值为null public Decimal orderQuantity { get; set; } 默认值为0.0解决问题:之前遇到的 Specified cast is not valid. 错误是因为 没有使用 可空类型 引起的,同时也解决了 做数值类型查询时,数值的默认值的问题。