一丶基本语法
var userList=db.set<table>().where(c=>c.id=="001"&&c.userName.Contains("张")).Tolist();
join连接查询
var newList = table1.Join(table2, u => u.id, p => p.userId, (u, p) => new { UserName = u.userName, }).ToList(); newList.ForEach(a => Console.WriteLine("姓名:{0}", a.UserName));
分组
var sUserListGroup = db.Sys_UserInfor.GroupBy(u => u.userSex).ToList();