예제 #1
0
 public UsersController(
     ShowUserService showUserService,
     AddUserService addUserService,
     UpdateUserService updateUserService,
     DeleteUserService deleteUserService)
 {
     _showUserService   = showUserService;
     _addUserService    = addUserService;
     _updateUserService = updateUserService;
     _deleteUserService = deleteUserService;
 }
예제 #2
0
        Delete([FromServices] DeleteUserService _delete, int Id)
        {
            try
            {
                var deletedUser = await _delete.Execute(Id);

                return(new UserView(deletedUser));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }