0

The error I get is this:

The 'SalesValue' property on 'ItemSale' could not be set to a 'Decimal' value. 
You must set this property to a non-null value of type 'Single'.

But I already did:

[Table("ItemSales")]
public class ItemSale {
    [Key]
    public int ID { get; set; }
    ....
    public Single SalesValue { get; set; }
}

Here is my LINQ, simple enough:

            from x in database.ItemSales
            select x

I am using Entity-Framework Code First

How do I solve this?

4

1 回答 1

0

您检查过列类型的精度吗?这是我曾经遇到的一个错误,据我所知,与你的非常相似。据我记得,精度必须为 2,但有另一个值。

于 2013-06-06T13:47:26.027 回答