public UserController(IAddUserCommand addUserCommand, IEditUserCommand editUserCommand, IDeleteUserCommand deleteUserCommand, IGetAllUsersQuery getAllUsersQuery) { _addUserCommand = addUserCommand; _editUserCommand = editUserCommand; _deleteUserCommand = deleteUserCommand; _getAllUsersQuery = getAllUsersQuery; }
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); }
public UsersController( IGetAllUsersQuery getAllUsersQuery, IUnbanUserCommand unbanUserCommand, IBanUserCommand banUserCommand, ISetNewRoleToUserCommand setNewRoleToUserCommand) { this.getAllUsersQuery = getAllUsersQuery; this.unbanUserCommand = unbanUserCommand; this.banUserCommand = banUserCommand; this.setNewRoleToUserCommand = setNewRoleToUserCommand; }
public UsersController( IGetAllUsersQuery getAllUsersQuery, IUpdateUserPhoneCommand updateUserPhoneCommand, IAddOrUpdateCarCommand addOrUpdateCarCommand, IGetUserInfoQuery getUserInfoQuery) { _getAllUsersQuery = getAllUsersQuery; _updateUserPhoneCommand = updateUserPhoneCommand; _addOrUpdateCarCommand = addOrUpdateCarCommand; _getUserInfoQuery = getUserInfoQuery; }
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; }
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; }
public UserController(IGetAllUsersQuery getAllUsersQuery) { this.getAllUsersQuery = getAllUsersQuery; }
public IActionResult Get([FromServices] IGetAllUsersQuery query, [FromQuery] UserSearch search) { return(Ok(_executor.ExecuteQuery(query, search))); }