public ActionResult Update(int segment, int athlete) { SegmentUpdate segmentUpdate = new SegmentUpdate(segment); segmentUpdate.UpdateSegment(); segmentUpdate.UpdateEfforts(segment); return RedirectToAction("Index", new { athlete = athlete, segment = segment }); }
private void UpdateEffortOnSegment(int segmentID, Models.Segment segmentInfo, SegmentUpdate segmentUpdater) { segmentUpdater.UpdateEfforts(segmentInfo); RidesWorstTime.Add(segmentID, segmentUpdater.WorstPlacing); // Update Leaderboard (dictionary) var segmentLBoards = segmentUpdater.LeaderBoards; foreach (var segmentLBoard in segmentLBoards) { AddToAthleteRidesLBoards(segmentLBoard.AthleteID, segmentID, segmentLBoard); } // Update Info Info.NoRidden += segmentLBoards.Count(); // verify it works as expected //info.NoRiders = }