It appears that your mapping is incorrect....You have a navigation property because...Group...
It must be added in the mapping in the following manner:...modelBuilder.Entity<Person>()
.HasOptional(t => t.Group)
.WithMany(t => t.People) // <---
.HasForeignKey(t => t.GroupId);
...If not, EF will construct a new foreign key and utilize the...
Where possible, I try to use extension methods when writing my queries. As a result, the following is a query that I can use:...int studentId =
from u in db.Users
where u.ExtId == dto.StudentExtId