public async Task <IActionResult> Create(HIPAAPrivacyNoticeViewModel hIPAAPrivacyNoticeVM) { if (ModelState.IsValid) { await _hipaaRepo.CreateAsync(hIPAAPrivacyNoticeVM.GetNewHIPAAPrivacyNotice()); return(RedirectToAction(nameof(Index))); } return(View(hIPAAPrivacyNoticeVM)); } // Create
public async Task <IActionResult> Edit(Guid id, HIPAAPrivacyNoticeViewModel hIPAAPrivacyNoticeVM) { if (ModelState.IsValid) { try { await _hipaaRepo.UpdateAsync(id, hIPAAPrivacyNoticeVM.GetNewHIPAAPrivacyNotice()); } catch (DbUpdateConcurrencyException) { if (_hipaaRepo.ReadAsync(id) == null) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(hIPAAPrivacyNoticeVM)); } // Edit