C# linq to entity中字段转化为指定类型 lambda 字段类型转换 解决"LINQ to Entities does not recognize the method 'System.String ToString(Int32)' method, and this method cannot be translated into a store expression."

 JobStatus= SqlFunctions.StringConvert((double)e.JobStatus)

日期转换指定格式

PFBeginMonth = SqlFunctions.DateName("yyyy", e.SS_EmpInfo.PFBeginMonth)+"-"+ SqlFunctions.DateName("MM", e.SS_EmpInfo.PFBeginMonth),

 

posted @ 2020-06-20 18:32  James·wang  阅读(636)  评论(0编辑  收藏  举报