How can I convert next SQL query to Entity Framework
SELECT
customers."CustomerId",
customers."CustomerName",
"Orders"."OrderId",
"Orders"."Description",
"Orders"."CustomerId",
"OrderDetails"."OrderDetailId",
"OrderDetails"."Article",
"OrderDetails"."OrderId"
FROM
"Orders"
RIGHT OUTER JOIN customers ON ("Orders"."CustomerId" = customers."CustomerId")
LEFT OUTER JOIN "OrderDetails" ON ("Orders"."OrderId" = "OrderDetails"."OrderId")
What I have tried:
public List<customers> GetAll()
{
var custord= _dbContext.customers .Include(x => x.Order) .Include(x => x.OrderDetails) .ToList(); return custord;
}
The problem: If I have Order without OrderDetail information I can not get all records.

OrderDetailclasses with navigation properties ieOrder.OrderDetails,Customer.Orders,Order.Customer, then EF will generate the JOINs when you execute egcontext.Customers.Include(c=>c.Orders).ThenInclude(o=>o.OrderDetails).ToList(). As long as you follow naming conventions all you have to do is define the DbSet<T> properties