0
該查詢工作在EF6:實體框架7聯合查詢錯誤
var ids = new int[] { 1, 2, 3 };
var consultants = _dbContext.Times
.Where(t => ids.Contains(t.MilestoneId))
.Select(t => t.Consultant)
.Union(
_dbContext.TimeBudgets
.Where(tb => ids.Contains(tb.MilestoneId))
.Select(tb => tb.Consultant)
);
在EF7,我得到的錯誤:
An unhandled exception occurred while processing the request.
做分離的查詢(沒有工會)工作? –
是的,沒有工會他們運行良好。 – Sean
好吧,你錯誤確切地在行'var consultants = ..'或者當你將它作爲consultants.ToList()來執行時?你可以展示你的模型的類:Times,TimeBudgets?另外Entity Framework 7目前處於預發佈階段,您可能需要等待其穩定版本嗎? –