Just use ThenInclude()
statement:
public class order
{
public int id { get; set; }
public virtual IList<OrderProducts> OrderProducts { get; set; }
}
//...
public IEnumerable<Order> GetAll()
{
return dataContext.Orders
.Include(order => order.OrderProducts)
.ThenInclude(orderProducts => orderProducts.Product);
}
As stated here, many-to-many relation is not yet implemented. You have to load your OrderProducts
then Select(orderProducts => orderProducts.Product)
Important: IntelliSense completion might tell you can't do this, but you can, just make a real build and it will work