public CustomersController(
     IMediator mediator,
     GetCustomerDetailsPresenter presenter)
 {
     this._mediator  = mediator;
     this._presenter = presenter;
 }
Пример #2
0
        public async Task <IActionResult> GetCustomer(
            [FromServices] IMediator mediator,
            [FromServices] GetCustomerDetailsPresenter presenter)
        {
            var input = new GetCustomerDetailsInput();
            await mediator.PublishAsync(input);

            return(presenter.ViewModel);
        }