4
我想選擇加載照片和電話實體的員工。 我使用這樣的查詢:實體框架4包含+表加入不一起工作
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();
結果有照片和HomeTelephone性空,但PHOTOID和HomeTelephone集...
我做錯了嗎?
謝謝。我有這個想法。 – v00d00 2011-02-18 07:36:41