我有一个数据库表Transaction(transactionID,LocalAmount...)。其中Localamount属性的数据类型是float。在UI上,我试图在按钮单击事件的一行中返回列(Localamount)的SUM。我使用了decimal而不是float但是,我在转换为decimal的代码中遇到错误System.NotSupportedExceptionwasunhandledbyusercodeMessage=CastingtoDecimalisnotsupportedinLINQtoEntitiesqueries,becausetherequiredprecisi