I want to select an employee with uploaded photographic and telephone objects. I use a query like this:
var empl = from user in ObjectContext.Users from employee in ObjectContext.Employees.Include("Photo").Include("HomeTelephone") where user.Id == userId && employee.Id == user.EmployeeId && employee.Deleted == false && employee.OwnerOrganizationId == Singleton.OrganizationId select employee; var result = empl.FirstOrDefault();
the result is null for the Photo and HomeTelephone properties, but has PhotoId and HomeTelephone ...
What am I doing wrong?
source share