public Result AddUser(UserDto userDto) { var resultInProgress = _resultInProgressFactory.CreateResultInProgress(); var command = new AddUserCommand(new User(userDto.Name, userDto.Surname), resultInProgress); _addUserCommandDispatcher.Execute(command); return(resultInProgress.CreateResult()); }
public Result AddUser(UserDto userDto) { var resultInProgress = _resultInProgressFactory.CreateResultInProgress(); var command = _commandFactory.CreateAddUserCommand(userDto, resultInProgress); command.Execute(); return(resultInProgress.CreateResult()); }