コード例 #1
0
 public UserController(IAddUserCommand addUserCommand, IEditUserCommand editUserCommand, IDeleteUserCommand deleteUserCommand, IGetAllUsersQuery getAllUsersQuery)
 {
     _addUserCommand = addUserCommand;
     _editUserCommand = editUserCommand;
     _deleteUserCommand = deleteUserCommand;
     _getAllUsersQuery = getAllUsersQuery;
 }
コード例 #2
0
 public void Setup()
 {
     _mockedAddUserCommand = MockRepository.GenerateMock<IAddUserCommand>();
     _mockedEditUserCommand = MockRepository.GenerateMock<IEditUserCommand>();
     _mockedDeleteUserCommand = MockRepository.GenerateMock<IDeleteUserCommand>();
     _mockedGetAllUsersQuery = MockRepository.GenerateMock<IGetAllUsersQuery>();
     _controller = new UserController(_mockedAddUserCommand, _mockedEditUserCommand, _mockedDeleteUserCommand, _mockedGetAllUsersQuery);
 }
コード例 #3
0
 public UsersController(
     IGetAllUsersQuery getAllUsersQuery,
     IUnbanUserCommand unbanUserCommand,
     IBanUserCommand banUserCommand,
     ISetNewRoleToUserCommand setNewRoleToUserCommand)
 {
     this.getAllUsersQuery        = getAllUsersQuery;
     this.unbanUserCommand        = unbanUserCommand;
     this.banUserCommand          = banUserCommand;
     this.setNewRoleToUserCommand = setNewRoleToUserCommand;
 }
コード例 #4
0
ファイル: UsersController.cs プロジェクト: tarasevichvlad/way
 public UsersController(
     IGetAllUsersQuery getAllUsersQuery,
     IUpdateUserPhoneCommand updateUserPhoneCommand,
     IAddOrUpdateCarCommand addOrUpdateCarCommand,
     IGetUserInfoQuery getUserInfoQuery)
 {
     _getAllUsersQuery       = getAllUsersQuery;
     _updateUserPhoneCommand = updateUserPhoneCommand;
     _addOrUpdateCarCommand  = addOrUpdateCarCommand;
     _getUserInfoQuery       = getUserInfoQuery;
 }
コード例 #5
0
 public UsersController(IAddUserCommand addUserCommand,
                        IDeleteUserCommand deleteUserCommand,
                        IUpdateUserCommand updateUserCommand,
                        IGetUserByIdValueQuery getUserByIdValueQuery,
                        IGetAllUsersQuery getAllUsersQuery,
                        IGetAllUsersPaginatedQuery getAllUsersPaginatedQuery)
 {
     _addUserCommand            = addUserCommand;
     _deleteUserCommand         = deleteUserCommand;
     _updateUserCommand         = updateUserCommand;
     _getUserByIdValueQuery     = getUserByIdValueQuery;
     _getAllUsersQuery          = getAllUsersQuery;
     _getAllUsersPaginatedQuery = getAllUsersPaginatedQuery;
 }
コード例 #6
0
 public UsersController(
     ILogger <UsersController> logger,
     ICreateUserCommand createUserCommand,
     IUpdateUserCommand updateUserCommand,
     IDeleteUserCommand deleteUserCommand,
     IGetUserQuery getUserQuery,
     IGetAllUsersQuery getAllUsersQuery
     )
 {
     this.logger            = logger;
     this.createUserCommand = createUserCommand;
     this.updateUserCommand = updateUserCommand;
     this.deleteUserCommand = deleteUserCommand;
     this.getUserQuery      = getUserQuery;
     this.getAllUsersQuery  = getAllUsersQuery;
 }
コード例 #7
0
 public UserController(IGetAllUsersQuery getAllUsersQuery)
 {
     this.getAllUsersQuery = getAllUsersQuery;
 }
コード例 #8
0
 public IActionResult Get([FromServices] IGetAllUsersQuery query, [FromQuery] UserSearch search)
 {
     return(Ok(_executor.ExecuteQuery(query, search)));
 }