diff --git a/Mango.Nop.Core/Dtos/MgOrderDto.cs b/Mango.Nop.Core/Dtos/MgOrderDto.cs index 171578e..1ee5aeb 100644 --- a/Mango.Nop.Core/Dtos/MgOrderDto.cs +++ b/Mango.Nop.Core/Dtos/MgOrderDto.cs @@ -8,6 +8,7 @@ using Mango.Nop.Core.Interfaces; using Nop.Core; using Nop.Core.Domain.Catalog; using Nop.Core.Domain.Common; +using Nop.Core.Domain.Customers; using Nop.Core.Domain.Orders; using Nop.Core.Domain.Shipping; @@ -29,6 +30,9 @@ public abstract class MgOrderDto : MgEntityBase, IMo public string CustomValuesXml { get; set; } public bool Deleted { get; set; } + [Association(ThisKey = nameof(CustomerId), OtherKey = nameof(Customer.Id), CanBeNull = false)] + public Customer Customer { get; set; } //TODO: CustomerDto!!! - J. + [Association(ThisKey = nameof(Id), OtherKey = nameof(OrderItem.OrderId), CanBeNull = true)] public List OrderItemDtos { get; set; } diff --git a/Mango.Nop.Core/Interfaces/IMgOrderDto.cs b/Mango.Nop.Core/Interfaces/IMgOrderDto.cs index 8796398..6246c8d 100644 --- a/Mango.Nop.Core/Interfaces/IMgOrderDto.cs +++ b/Mango.Nop.Core/Interfaces/IMgOrderDto.cs @@ -1,6 +1,7 @@ using AyCode.Interfaces.Entities; using Mango.Nop.Core.Dtos; using Nop.Core.Domain.Common; +using Nop.Core.Domain.Customers; using Nop.Core.Domain.Orders; using Nop.Core.Domain.Shipping; @@ -31,6 +32,7 @@ public interface IMgOrderDto : IEntityInt, ISoftDele public string CustomOrderNumber { get; set; } public string CustomValuesXml { get; set; } + public Customer Customer { get; } //TODO: CustomerDto!!! - J. public List OrderItemDtos { get; } void InitializeOrderItemDtos(List orderItemDtos);