首页 > 代码库 > LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)' method

LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)' method

System.Data.Objects.EntityFunctions和System.Data.Objects.SqlClient.SqlFunctions中的方法进行比较,如下

where System.Data.Objects.SqlClient.SqlFunctions.DateDiff("s",DateTime.Now,u.Time)>0

where System.Data.Objects.EntityFunctions.DiffSeconds(DateTime.Now,u.Time)>0

 

LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)' method