Open tevert opened 7 years ago
At the start of this project, the pattern was:
var user = db.Users.FirstOrDefault(u => u.UserName == "whatever"); var surveys = db.Surveys.Where(s => s.Owner.UserName == user.UserName);
I've since added an OwnedSurveys collection to the User object, so we should be able to just .Include the surveys in the original DB hit.
OwnedSurveys
At the start of this project, the pattern was:
I've since added an
OwnedSurveys
collection to the User object, so we should be able to just .Include the surveys in the original DB hit.