Beispiel #1
0
 public async Task <IActionResult> Create(CreateGradeBindingModel createGradeBindingModel)
 {
     try
     {
         await gradeService.CreateAsync(createGradeBindingModel, this.User.Identity.Name);
     }
     catch (Exception e)
     {
         if (e.Message == "The User is either non-existent or is not a student")
         {
             return(this.View("~/Views/Shared/NonExistentStudentPage.cshtml"));
         }
     }
     return(this.RedirectToAction("Index", "Home"));
 }
Beispiel #2
0
 public async Task CreateAsync(Grade model, bool saved = true)
 {
     await _server.CreateAsync(model, saved);
 }