Question: Is the above possible in EF-Core 1.1? I'm trying the following but VS2015
complaining on line Select new TestViewModel{...}
with the error: name Select does not exist in the current context
. If the above is not possible what's a workaround while sill using include(...)
? Note: Customers
is joined to Addresses
and Orders
table
var qry = from c in _context.Customers.Include(t => t.Addresses).Where(c => c.Region== "NW").OrderBy(c => c.Name)
join ord in _context.Orders on c.CustomerID equals ord.CustomerID
Select new TestViewModel
{
CustName = c.Name,
CustRegion = c.Region,
OrderType = ord.Type,
....
};
select
is a keyword, and keywords are case-sensitive. Just like you cannot declare class Public Static
- you cannot use Select
.