實體框架7聯合查詢錯誤

entity-framework entity-framework-core

此查詢適用於EF6:

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.

一般承認的答案

這似乎是未實施(尚未)。 https://github.com/aspnet/EntityFramework/issues/3459



Related

許可下: CC-BY-SA with attribution
不隸屬於 Stack Overflow
許可下: CC-BY-SA with attribution
不隸屬於 Stack Overflow