From ad1303223c8272a9400ffc77710ac1e1a34c9cae Mon Sep 17 00:00:00 2001 From: yoav kaplan Date: Tue, 18 Jan 2022 20:18:44 +0200 Subject: [PATCH] Remove redundant IMapper injection and member. --- .../Commands/DeleteOrder/DeleteOrderCommandHandler.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Services/Ordering/Ordering.Application/Features/Orders/Commands/DeleteOrder/DeleteOrderCommandHandler.cs b/src/Services/Ordering/Ordering.Application/Features/Orders/Commands/DeleteOrder/DeleteOrderCommandHandler.cs index 5b817cfb..cb0bccfb 100644 --- a/src/Services/Ordering/Ordering.Application/Features/Orders/Commands/DeleteOrder/DeleteOrderCommandHandler.cs +++ b/src/Services/Ordering/Ordering.Application/Features/Orders/Commands/DeleteOrder/DeleteOrderCommandHandler.cs @@ -1,5 +1,4 @@ -using AutoMapper; -using MediatR; +using MediatR; using Microsoft.Extensions.Logging; using Ordering.Application.Contracts.Persistence; using Ordering.Application.Exceptions; @@ -13,13 +12,11 @@ namespace Ordering.Application.Features.Orders.Commands.DeleteOrder public class DeleteOrderCommandHandler : IRequestHandler { private readonly IOrderRepository _orderRepository; - private readonly IMapper _mapper; private readonly ILogger _logger; - public DeleteOrderCommandHandler(IOrderRepository orderRepository, IMapper mapper, ILogger logger) + public DeleteOrderCommandHandler(IOrderRepository orderRepository, ILogger logger) { _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); - _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }