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