我有一个这样的查询,它将两个实体连接在一起:
IEnumerable<ICD.ViewModels.HomeSearchViewModel> query =
ICDUnitOfWork.AlphaGroups.Find().GroupJoin(ICDUnitOfWork.Alphas.Find(),
a => a.AlphaGroupID,
g => g.AlphaGroupID,
(alphaGroups, alphas) =>
new ICD.ViewModels.HomeSearchViewModel
{
AlphaGroups =
alphaGroups,
Alphas = alphas,
SearchTerm = searchTerm
}).OrderBy(x => x.AlphaGroups.Title);
我需要将 Alphas 实体与另一个名为“代码”的实体连接起来。是否可以在单个查询中执行此操作,还是应该将其分解为 2 个单独的查询?