Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="employeeService"></param>
 /// <param name="employeeIntegrationEventService"></param>
 /// <param name="logger"></param>
 public EmployeeController(IEmployeeRepository employeeService,
                           IEmployeeIntegrationEventService employeeIntegrationEventService, ILogger logger)
 {
     _employeeService = employeeService;
     _employeeIntegrationEventService = employeeIntegrationEventService;
     _logger = logger;
 }
 public TransactionBehaviour(EmployeeContext dbContext,
                             IEmployeeIntegrationEventService employeeIntegrationEventService,
                             ILogger <TransactionBehaviour <TRequest, TResponse> > logger)
 {
     _dbContext = dbContext ?? throw new ArgumentException(nameof(EmployeeContext));
     _employeeIntegrationEventService = employeeIntegrationEventService ?? throw new ArgumentException(nameof(EmployeeIntegrationEventService));
     _logger = logger ?? throw new ArgumentException(nameof(ILogger));
 }
Ejemplo n.º 3
0
 // Using DI to inject infrastructure persistence Repositories
 public CreateEmployeePermanentCommandHandler(IMediator mediator,
                                              IEmployeeIntegrationEventService employeeIntegrationEventService,
                                              IEmployeeRepository employeeRepository,
                                              IIdentityService identityService,
                                              ILogger <CreateEmployeePermanentCommandHandler> logger)
 {
     _Repository      = employeeRepository ?? throw new ArgumentNullException(nameof(employeeRepository));
     _identityService = identityService ?? throw new ArgumentNullException(nameof(identityService));
     _mediator        = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _employeeIntegrationEventService = employeeIntegrationEventService ?? throw new ArgumentNullException(nameof(employeeIntegrationEventService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }