entityframework导航属性筛选

entityframework导航属性筛选

var user = db.UserInfos.FirstOrDefault(a => a.Id == 5); //会在sql代码中生成Street = "上海"代码 var address1 = db.Entry(user).Collection(b => b.Address).Query().Where(p => p.Street == "上海" ).ToList(); //会把所有的Street的代码都取回内存,然后在内存在再访问 var address2 = user.Address.Where(p => p.Street == "上海").Count();
entityframework导航属性筛选

entityframework导航属性筛选

上一篇:线程之线程同步


下一篇:photoshop 浪漫的冬季雪景美女图片