Beispiel #1
0
 public IActionResult OnGet(int trainingId)
 {
     training = this.trainingDataService.GetById(trainingId);
     if (training == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
 public Training Add(Training newTraining)
 {
     newTraining.Id = trainings.Max(x => x.Id) + 1;
     trainings.Add(newTraining);
     return(newTraining);
 }