0
您好我在实体框架中有错误。我将sp的get()导入到EF中,并将结果作为复杂数据类型'GetResult'返回。在edmx xml中,我已将'Amount'类型设置为decimal。实体框架中的函数导入错误
<ComplexType Name="Get_Result">
<Property Type="String" Name="Description" Nullable="true" MaxLength="255" />
<Property Type="Decimal" Name="Amount" Nullable="false" />
<Property Type="Decimal" Name="Gst" Nullable="false" Precision="19" />
<Property Type="Decimal" Name="Total" Nullable="true" Precision="19" />
</ComplexType>
我尝试的结果与datagridview的
gridview.DataSource = db.Get().ToList();
它不停地给我这样的错误信息进行绑定。并且我无法在EF中的任何地方找到int32,并且已经更新了&多次构建的EF。
The 'Amount' property on 'Get_Result' could not be set to a 'Int32' value. You must set this property to a non-null value of type 'Decimal'.
任何帮助赞赏...