ris*_*ism 7 c# types entity-framework
我收到一个错误:
"'EoiQuote'上的'BomAmountTaxRate'属性无法设置为'System.Double'值.您必须将此属性设置为'System.Single'类型的非null值."
db表架构是:
QuoteID uniqueidentifier Unchecked
SubmissionDate datetime Unchecked
RfqID uniqueidentifier Unchecked
SupplierID uniqueidentifier Unchecked
SupplierRef nvarchar(50) Checked
BomAmountExTax decimal(18, 2) Unchecked
BomAmountCurrencyID int Unchecked
BomAmountTaxRate float Unchecked
BomTaxAmount decimal(18, 0) Unchecked
FreightAmountExTax decimal(18, 0) Unchecked
FreightAmountCurrencyID int Unchecked
FreightAmountTaxRate float Unchecked
FreightTaxAmount decimal(18, 0) Unchecked
FreeFormParticulars text Checked
AvailabilityOpeningDate datetime Checked
AvailabilityClosingDate datetime Checked
Status int Unchecked
TransactionID uniqueidentifier Checked
Quantity int Unchecked
LastModified datetime Unchecked
ReviewedDate datetime Checked
RevisionID tinyint Checked
Run Code Online (Sandbox Code Playgroud)
而EoiQuote POCO如下:
public class EoiQuote
{
public Guid QuoteID { get; set; }
public DateTime SubmissionDate { get; set; }
public Guid RfqID { get; set; }
public Guid SupplierID { get; set; }
public string SupplierRef { get; set; }
public decimal BomAmountExTax { get; set; }
public int BomAmountCurrencyID { get; set; }
public float BomAmountTaxRate { get; set; }
public decimal BomTaxAmount { get; set; }
public decimal FreightAmountExTax { get; set; }
public int FreightAmountCurrencyID { get; set; }
public float FreightAmountTaxRate { get; set; }
public decimal FreightTaxAmount { get; set; }
public string FreeFormParticulars { get; set; }
public DateTime AvailabilityOpeningDate { get; set; }
public DateTime AvailabilityClosingDate { get; set; }
public int Status { get; set; }
public Guid TransactionID { get; set; }
public int Quantity { get; set; }
public DateTime LastModified { get; set; }
public EoiQuote()
{
}
}
Run Code Online (Sandbox Code Playgroud)
因此,正常情况下,EF错误绝对没有任何意义.float = float:对吗?
归档时间: |
|
查看次数: |
8753 次 |
最近记录: |