Exemple #1
0
 public IActionResult Admin(VolunteerHoursModel model)
 {
     if (ModelState.IsValid)
     {
         model.CreateOrUpdate(_context, model.UserId);
     }
     return(RedirectToAction("Admin"));
 }
Exemple #2
0
 public IActionResult Index(VolunteerHoursModel model)
 {
     if (ModelState.IsValid)
     {
         model.CreateOrUpdate(_context, _userManager.GetUserId(User));
     }
     return(RedirectToAction("Index"));
 }