【发布时间】:2013-10-18 19:08:48
【问题描述】:
Below 返回建筑物中的所有人以及他们所有的计算机,这很有效。
我想将其更改为仅包括 Active == 1 的计算机和 ActivityTypeId == 5 的 ActivityLogs。但如果它们都没有,我仍然希望此人返回。
public IQueryable<Person> GetPeople(int BuildingId)
{
return this.ObjectContext.People
.Include("Computers")
.Include("ActivityLog")
.Where(p => p.buildingId == BuildingId && !p.migrated)
.OrderBy(p => p.name);
}
【问题讨论】:
标签: linq entity-framework silverlight wcf-ria-services ria