This query works in 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)
);
In EF7, I get the error:
An unhandled exception occurred while processing the request.
This appears to be Not Implemented (yet). https://github.com/aspnet/EntityFramework/issues/3459