Alexander

Results 2 issues of Alexander

The following query doesn't work: var query = db.MyEntity.Select(s => s.Id).Union(new[] { 5 }); It seems like unions accept only queries as their parameters, because the query below works fine:...

var ids = new[] { 5 }.AsQueryable(); var query = db.MyEntity.Where(s => ids.Contains(s.Id)); If "ids" was a simple array, the query would work fine.