public async Task Submit(TeamContestRegistration registration) { var command = new RegisterTeamToContest() { ContestId = registration.ContestId, GameId = Guid.NewGuid(), TeamName = registration.TeamName, Player1Name = registration.Player1Name, Player2Name = registration.Player2Name, Player3Name = registration.Player3Name, Player4Name = registration.Player4Name, Player5Name = registration.Player5Name }; _commandBus.Publish(command); await Task.FromResult<object>(null); }
public async Task Submit() { if (!this.CanSubmit()) { throw new InvalidOperationException(); } TeamContestRegistration registration = new TeamContestRegistration() { ContestId = this.ContestId, TeamName = this.TeamName, Player1Name = this.Player1Name, Player2Name = this.Player2Name, Player3Name = this.Player3Name, Player4Name = this.Player4Name, Player5Name = this.Player5Name, }; await _registrationService.Submit(registration); this.CloseViewRequested(this, EventArgs.Empty); }