Entity FrameworkでLinqのUnionメソッドを使用する場合、同一での使用回数に上限はありIQueryable
ますか?
このスニペットを考えてみてください。明らかに少し不自然です。
public IQueryable<Person> GetPeople(IEnumerable<PersonDto> candidates)
{
var successful = this.peopleRepository.All().Where(p => false);
foreach(var candidate in candidates)
{
if (candidate.IsSuccessful())
{
var successfulCandidate = this.peopleRepository.All()
.Where(p => p.id == candidate.id);
successful = successful.Union(successfulCandidate);
}
}
return successful;
}
IQueryables
Entity Framework と SQL Server を使用してユニオンを作成し、結果を取得できる回数に制限はありますか?