diff --git a/Mango.Nop.Core/Dtos/MgOrderItemDto.cs b/Mango.Nop.Core/Dtos/MgOrderItemDto.cs index edf8829..6c20457 100644 --- a/Mango.Nop.Core/Dtos/MgOrderItemDto.cs +++ b/Mango.Nop.Core/Dtos/MgOrderItemDto.cs @@ -16,6 +16,8 @@ public abstract class MgOrderItemDto : MgEntityBase, IModelDtoBase< public string AttributesXml { get; set; } public decimal? ItemWeight { get; set; } + public string ProductName => ProductDto?.Name ?? "ProductDto is null!!!"; + [Association(ThisKey = nameof(ProductId), OtherKey = nameof(Product.Id), CanBeNull = true)] public TProductDto? ProductDto { get; set; } diff --git a/Mango.Nop.Core/Interfaces/IMgOrderItemDto.cs b/Mango.Nop.Core/Interfaces/IMgOrderItemDto.cs index a150384..77f9862 100644 --- a/Mango.Nop.Core/Interfaces/IMgOrderItemDto.cs +++ b/Mango.Nop.Core/Interfaces/IMgOrderItemDto.cs @@ -16,6 +16,8 @@ public interface IMgOrderItemDto : IEntityInt where TProductDto : I public string AttributesXml { get; set; } public decimal? ItemWeight { get; set; } + + public string ProductName { get; } public TProductDto? ProductDto { get; set; } void InitializeProductDto(TProductDto productDto);