DMSFrame 之查询表达式用法(一)
where条件
WhereClip<Adm_User> where = new WhereClip<Adm_User>(q => q.DeleteFlag == false); where.And(q => q.UserID == 1); where.Like("UserName", "123"); where.GreaterThan("UserName", "A"); where.Equal("TrueName", "admin");
order by 排序
OrderByClip<Adm_User> orderby = new OrderByClip<Adm_User>(); orderby.Appends("UserID", true);//后一个参数表示是否倒序 orderby.Appends(q => q.OrderBy(q.UserID, q.UserName.Desc()));
group by 分组
GroupByClip<Adm_User> groupby = new GroupByClip<Adm_User>(); groupby.Appends("UserID"); groupby.Appends(q => q.GroupBy(q.UserID, q.UserName));
可以说:DMSFrame在查询上还是非常灵活的.只有您想不到的,没有做不到的方式
千人.NET交流群:18362376,因为有你,代码变得更简单,加群请输入cnblogs