I am trying to query multiple tables in EF Core using union as below, but it does not allow. Please find the query and also attached the image on the error hint that .net core frame work provides.
var query =
_context.Brand.Select(x => new { BrandID = x.Brandid })
.Union(_context.Factory.Select(x => new { Fa = x.Factorycode }))
.Union(_context.Brandfactory.Select(x => new { BrFc = x.Factoryid }));