public async Task <TeamSignUpForm> AddSignUpFormAsync(TeamSignUpForm teamSignUpForm, CancellationToken ct = default) { this._dbContext.TeamSignUpForms.Add(teamSignUpForm); await this._dbContext.SaveChangesAsync(ct); return(teamSignUpForm); }
public static TeamSignUpFormViewModel Convert(TeamSignUpForm TeamSignUpForm) { TeamSignUpFormViewModel TeamSignUpFormViewModel = new TeamSignUpFormViewModel(); TeamSignUpFormViewModel.Id = TeamSignUpForm.Id; TeamSignUpFormViewModel.Name = TeamSignUpForm.Name; TeamSignUpFormViewModel.Contact = ContactConverter.Convert(TeamSignUpForm.Contact); return(TeamSignUpFormViewModel); }
public async Task <TeamSignUpFormViewModel> AddTeamSignUpFormAsync(TeamSignUpFormViewModel newTeamViewModel, CancellationToken ct = default(CancellationToken)) { TeamSignUpForm newTeamForm = new TeamSignUpForm() { Name = newTeamViewModel.Name }; newTeamForm = await this._teamSignUpRepository.AddSignUpFormAsync(newTeamForm); newTeamViewModel.Id = newTeamForm.Id; Contact teamContact = new Contact() { FirstName = newTeamViewModel.Contact.FirstName, LastName = newTeamViewModel.Contact.LastName, Email = newTeamViewModel.Contact.Email, PhoneNumber = newTeamViewModel.Contact.PhoneNumber, TeamSignUpFormId = newTeamViewModel.Id }; newTeamViewModel.Contact = ContactConverter.Convert(await this._teamSignUpRepository.AddTeamContactAsync(teamContact, ct)); return(newTeamViewModel); }
public Task <bool> UpdateSignUpFormAsync(TeamSignUpForm leagueImage, CancellationToken ct = default) { throw new NotImplementedException(); }