111,125
社区成员
发帖
与我相关
我的任务
分享
程序错误信息:System.InvalidOperationException: 从具体化“System.Decimal”类型到“System.Int32”类型的指定强制转换无效。
在 System.Data.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)
在 lambda_method(Closure , Shaper )
在 System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
在 System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
在 System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
在 Talkweb.Mes.Bdm.Logics.TypeRefDicManager.IsExistsPermisionControl(String ObjRefID) 位置 d:\sxmes\Talkweb.Mes\Bdm\Talkweb.Mes.Bdm.Logics\Bdm\TypeRefDicManager.cs:行号 246
一般是 EF执行时的报错,linq的模型和数据库的字段定义的类型不匹配导致的错误!