文章分类 -  EntityFramwork

摘要:int[] statusArray=new int[]{(int)MEStatus.作业前一个月,(int)MEStatus.作业前三个月,(int)MEStatus.未施工}; return LepulsDB.DBContext.Dan_MonitorEvaluate.Count(t => t.P 阅读全文
posted @ 2016-12-20 18:52 飞刀软件 阅读(930) 评论(0) 推荐(0)
摘要:ef动态拼接查询字段可以使用委托的方式Func Func<Sc_V_PersonalInspectionTableSchema, WhereClip> whereExp = p => { var whereClip = WhereClip.All; if (PlanBeginTime!=null) 阅读全文
posted @ 2016-12-14 14:37 飞刀软件 阅读(429) 评论(0) 推荐(0)
摘要:ef4.0以上可以使用tostring(); var sql = DataAccess.LepulsDB.DBContext.Sc_V_PersonalInspection.Select().Where(whereExp).ToString(); 生成的结果: SELECT [Sc_V_Person 阅读全文
posted @ 2016-12-14 14:32 飞刀软件 阅读(527) 评论(0) 推荐(0)