public bool AddTeamToRace(int raceEventId, int teamId, string updateById) { var team = GetById(teamId); team.RaceEventId = raceEventId; team.UpdatedOn = DateTime.Now; team.UpdatedById = updateById; repo.Update(team); return(repo.SaveChanges()); }
public IActionResult Put(string key, [FromBody] Team updateTeam) { _logger.Log($"key:{updateTeam.Key}"); if (updateTeam == null || updateTeam.Key.ToString() != key) { return(HttpBadRequest()); } var release = TeamRepo.FindByKey(key); if (release == null) { return(HttpNotFound()); } TeamRepo.Update(updateTeam); return(new NoContentResult()); }