コード例 #1
0
        public async Task <IActionResult> GetAllUsers(
            [FromServices] IGetAllUsersUseCase getAllUsersUseCase,
            [FromServices] GetAllUsersPresenter getAllUsersPresenter)
        {
            await getAllUsersUseCase.Execute(new GetAllUsersInput());

            return(getAllUsersPresenter.ViewModel);
        }
コード例 #2
0
 public async Task <IActionResult> ListUsers([FromQuery] UserQueryParam userQueryParam)
 {
     try
     {
         return(Ok(await _getAllUseCase.Execute(userQueryParam).ConfigureAwait(false)));
     }
     catch (UseCaseException e)
     {
         return(BadRequest(e));
     }
 }