Added possibility to chain includes. (#331)
* Added possibility to chain includes. * Removed interface. * Removed the need for generating GUIDs as ids and added tests.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Helpers.Query;
|
||||
|
||||
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
|
||||
{
|
||||
@@ -7,8 +8,7 @@ namespace Microsoft.eShopWeb.ApplicationCore.Specifications
|
||||
public CustomerOrdersWithItemsSpecification(string buyerId)
|
||||
: base(o => o.BuyerId == buyerId)
|
||||
{
|
||||
AddInclude(o => o.OrderItems);
|
||||
AddInclude($"{nameof(Order.OrderItems)}.{nameof(OrderItem.ItemOrdered)}");
|
||||
AddIncludes(query => query.Include(o => o.OrderItems).ThenInclude(i => i.ItemOrdered));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user