I have such a request.
var query = from o in _context.Orders
join c in _context.Customers on o.CustomerId equals c.CustomerId
orderby o.ShippedDate descending
select new {OrderId = o.OrderId, Customer = c.FirstName};
I get the error "Only initializers, entities, and entity navigation properties are supported." I swear that I can do it earlier, but for me life cannot understand what the problem is. I also cannot restructure such a request.
var query = from o in _context.Orders
orderby o.ShippedDate descending
select new {OrderId = o.OrderId, Customer = o.Customer.FirstName};
Upset.
source
share