Loading BusinessLayer/DTOs/CreateOrderDto.cs +1 −2 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,5 @@ public class CreateOrderDto : BaseEntityDto public int UserId { get; set; } public int UserId { get; set; } public int AddressId { get; set; } public int AddressId { get; set; } public IEnumerable<CartItemDetailDto> CartItems { get; set; } = []; public string? CouponCodeString { get; set; } public string? CouponCodeString { get; set; } } } BusinessLayer/DTOs/OrderDetailDto.cs +1 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,5 @@ public class OrderDetailDto public int UserId { get; set; } public int UserId { get; set; } public CouponCode? CouponCode { get; set; } public CouponCode? CouponCode { get; set; } public int AddressId { get; set; } public List<OrderProductDetailDto> OrderProducts { get; set; } = []; public List<OrderProductDetailDto> OrderProducts { get; set; } = []; } } BusinessLayer/Facades/ProductFacade.cs +6 −6 Original line number Original line Diff line number Diff line Loading @@ -27,19 +27,19 @@ public class ProductFacade(IProductService productService, IImageService imageSe return await productService.CreateProductAsync(mapper.Map<ProductDto>(productImageDto)); return await productService.CreateProductAsync(mapper.Map<ProductDto>(productImageDto)); } } public async Task<IEnumerable<ProductDto>> GetAllProductsAsync() public Task<IEnumerable<ProductDto>> GetAllProductsAsync() { { return await productService.GetAllProductsAsync(); return productService.GetAllProductsAsync(); } } public async Task<FilteredResult<ProductDto>> GetProductsFilteredAsync(ProductFilterDto productFilter) public Task<FilteredResult<ProductDto>> GetProductsFilteredAsync(ProductFilterDto productFilter) { { return await productService.GetProductsFilteredAsync(productFilter); return productService.GetProductsFilteredAsync(productFilter); } } public async Task<ProductDto?> GetProductByIdAsync(int id) public Task<ProductDto?> GetProductByIdAsync(int id) { { return await productService.GetProductByIdAsync(id); return productService.GetProductByIdAsync(id); } } public async Task<ProductDetailDto?> GetProductDetailByIdAsync(int id) public async Task<ProductDetailDto?> GetProductDetailByIdAsync(int id) Loading BusinessLayer/Services/GiftCardService.cs +3 −3 Original line number Original line Diff line number Diff line Loading @@ -89,9 +89,9 @@ public class GiftCardService( return ret is null ? null : mapper.Map<CouponCodeDto>(ret); return ret is null ? null : mapper.Map<CouponCodeDto>(ret); } } public async Task<IEnumerable<CouponCodeDto>> GetCouponCodesAsync() public Task<List<CouponCodeDto>> GetCouponCodesAsync() { { return await couponCodeRepository.GetAllAsync() return couponCodeRepository.GetAllAsync() .ContinueWith(task => mapper.Map<List<CouponCodeDto>>(task.Result)); .ContinueWith(task => mapper.Map<List<CouponCodeDto>>(task.Result)); } } Loading BusinessLayer/Services/Interfaces/IGiftCardService.cs +1 −1 Original line number Original line Diff line number Diff line Loading @@ -12,7 +12,7 @@ public interface IGiftCardService Task<bool> DeleteGiftCardByIdAsync(int id); Task<bool> DeleteGiftCardByIdAsync(int id); Task<CouponCodeDto?> RedeemCouponAsync(string CouponCode); Task<CouponCodeDto?> RedeemCouponAsync(string CouponCode); Task<IEnumerable<CouponCodeDto>> GetCouponCodesAsync(); Task<List<CouponCodeDto>> GetCouponCodesAsync(); Task<CouponCodeDto?> GetCouponCodeByIdAsync(int id); Task<CouponCodeDto?> GetCouponCodeByIdAsync(int id); Loading Loading
BusinessLayer/DTOs/CreateOrderDto.cs +1 −2 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,5 @@ public class CreateOrderDto : BaseEntityDto public int UserId { get; set; } public int UserId { get; set; } public int AddressId { get; set; } public int AddressId { get; set; } public IEnumerable<CartItemDetailDto> CartItems { get; set; } = []; public string? CouponCodeString { get; set; } public string? CouponCodeString { get; set; } } }
BusinessLayer/DTOs/OrderDetailDto.cs +1 −2 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,5 @@ public class OrderDetailDto public int UserId { get; set; } public int UserId { get; set; } public CouponCode? CouponCode { get; set; } public CouponCode? CouponCode { get; set; } public int AddressId { get; set; } public List<OrderProductDetailDto> OrderProducts { get; set; } = []; public List<OrderProductDetailDto> OrderProducts { get; set; } = []; } }
BusinessLayer/Facades/ProductFacade.cs +6 −6 Original line number Original line Diff line number Diff line Loading @@ -27,19 +27,19 @@ public class ProductFacade(IProductService productService, IImageService imageSe return await productService.CreateProductAsync(mapper.Map<ProductDto>(productImageDto)); return await productService.CreateProductAsync(mapper.Map<ProductDto>(productImageDto)); } } public async Task<IEnumerable<ProductDto>> GetAllProductsAsync() public Task<IEnumerable<ProductDto>> GetAllProductsAsync() { { return await productService.GetAllProductsAsync(); return productService.GetAllProductsAsync(); } } public async Task<FilteredResult<ProductDto>> GetProductsFilteredAsync(ProductFilterDto productFilter) public Task<FilteredResult<ProductDto>> GetProductsFilteredAsync(ProductFilterDto productFilter) { { return await productService.GetProductsFilteredAsync(productFilter); return productService.GetProductsFilteredAsync(productFilter); } } public async Task<ProductDto?> GetProductByIdAsync(int id) public Task<ProductDto?> GetProductByIdAsync(int id) { { return await productService.GetProductByIdAsync(id); return productService.GetProductByIdAsync(id); } } public async Task<ProductDetailDto?> GetProductDetailByIdAsync(int id) public async Task<ProductDetailDto?> GetProductDetailByIdAsync(int id) Loading
BusinessLayer/Services/GiftCardService.cs +3 −3 Original line number Original line Diff line number Diff line Loading @@ -89,9 +89,9 @@ public class GiftCardService( return ret is null ? null : mapper.Map<CouponCodeDto>(ret); return ret is null ? null : mapper.Map<CouponCodeDto>(ret); } } public async Task<IEnumerable<CouponCodeDto>> GetCouponCodesAsync() public Task<List<CouponCodeDto>> GetCouponCodesAsync() { { return await couponCodeRepository.GetAllAsync() return couponCodeRepository.GetAllAsync() .ContinueWith(task => mapper.Map<List<CouponCodeDto>>(task.Result)); .ContinueWith(task => mapper.Map<List<CouponCodeDto>>(task.Result)); } } Loading
BusinessLayer/Services/Interfaces/IGiftCardService.cs +1 −1 Original line number Original line Diff line number Diff line Loading @@ -12,7 +12,7 @@ public interface IGiftCardService Task<bool> DeleteGiftCardByIdAsync(int id); Task<bool> DeleteGiftCardByIdAsync(int id); Task<CouponCodeDto?> RedeemCouponAsync(string CouponCode); Task<CouponCodeDto?> RedeemCouponAsync(string CouponCode); Task<IEnumerable<CouponCodeDto>> GetCouponCodesAsync(); Task<List<CouponCodeDto>> GetCouponCodesAsync(); Task<CouponCodeDto?> GetCouponCodeByIdAsync(int id); Task<CouponCodeDto?> GetCouponCodeByIdAsync(int id); Loading