EF使用linq进行多表查询是完全可以的,最后ToList()调用的时候回产生一条分页的sql语句,所以并不是全部查询再分页的.所以不会影响查询的性能 public void TestLinq() { var a = from m in DbContext.Set<T1>() join q in DbContext.Set<T2>() on m.ID equals q.ID select m; a.OrderBy(m=>m.Phone_User).Skip().Take().…
在使用EF时,想要比较字符串类型的日期时,参考以下: SQL语句: 1)select * from TableName where StartTime > ‘2015-04-08‘ 2)select * from TableName where StartTime >= ‘2015-04-08‘ 3)select * from TableName where StartTime < ‘2015-04-08‘ 4)select * from TableName where StartTim…