public IActionResult DeleteConfirmed(int id) { QUESTOR thisQUESTOR = questorRepo.QUESTORs.FirstOrDefault(x => x.QUESTORId == id); questorRepo.Remove(thisQUESTOR); return(RedirectToAction("Index")); }
public IActionResult Edit(QUESTOR questor) { questorRepo.Edit(questor); ViewBag.thisQUESTOR = questorRepo.QUESTORs .Include(g => g.Goals) .Include(m => m.Modules) .ThenInclude(p => p.Projects) .ThenInclude(s => s.Steps) .Include(m => m.Modules) .ThenInclude(p => p.Projects) .ThenInclude(s => s.Responses) .Include(m => m.Modules) .FirstOrDefault(x => x.QUESTORId == questor.QUESTORId); return(RedirectToAction("Edit", "QUESTORs", new { id = questor.QUESTORId })); }
public IActionResult Create(QUESTOR questor) { questorRepo.Save(questor); return(RedirectToAction("Index")); }