Entity Framework query to select
table people: SSN, name table students: SSN, school
I want to get all SSN for people who are not students. How do I write开发者_如何学运维 this with entity framework?
var ssnList = Context.Peoples
.Where( p => !Context.Students
.Any(s => s.SSN == p.SSN))
.Select( p => p.SSN).ToList();
精彩评论