public async Task <int> CreateCode(AddCompetitor addCompetitor) { var Code = new Domain.Code.Code(addCompetitor.confirmationCode, addCompetitor.firstName, addCompetitor.lastName, addCompetitor.legueId, addCompetitor.Ranking); int Id = await _codeRepository.AddCode(Code); return(Id); }
public IActionResult Add(Code code) { if (ModelState.IsValid) { _codeRepository.AddCode(code); return(RedirectToAction("Detail", code)); } else { return(View(code)); } } // end Add code post
public void AddCode(Codes code) { codeRepository.AddCode(code); }
protected override async Task <Unit> HandleValidatedCommand(AddCodeCommand command) { await _repository.AddCode(command.Name); return(Unit.Value); }