代码
List<materials_details> materialList = je.materials_details.Where(x => checkedid.Contains(System.Data.Objects.SqlClient.SqlFunctions.StringConvert((decimal?)x.AFFAIRID).Trim())).ToList();
报错
类型“System.Data.Entity.SqlServer.SqlFunctions”上指定的方法“System.String StringConvert(System.Nullable1[System.Double], System.Nullable
1[System.Int32])”无法转换为 LINQ to Entities 存储表达式。
尝试过的方法
换成EF6然后用System.Data.Entity.SqlServer命名空间的这个方法
EF4用System.Data.Objects.SqlClient中的这个方法
都不行
然后换成linq写法也不行