public async Task <IActionResult> GetAllUsers( [FromServices] IGetAllUsersUseCase getAllUsersUseCase, [FromServices] GetAllUsersPresenter getAllUsersPresenter) { await getAllUsersUseCase.Execute(new GetAllUsersInput()); return(getAllUsersPresenter.ViewModel); }
public async Task <IActionResult> ListUsers([FromQuery] UserQueryParam userQueryParam) { try { return(Ok(await _getAllUseCase.Execute(userQueryParam).ConfigureAwait(false))); } catch (UseCaseException e) { return(BadRequest(e)); } }