public IActionResult CreateResponse(Response response) { responseRepo.Save(response); ViewBag.thisResponse = responseRepo.Responses .Include(p => p.Project) .ThenInclude(m => m.Module) .ThenInclude(q => q.QUESTOR) .FirstOrDefault(x => x.ResponseId == response.ResponseId); var thisStep = responseRepo.Responses.FirstOrDefault(x => x.ResponseId == response.ResponseId); return(RedirectToAction("Edit", "QUESTORs", new { id = ViewBag.thisResponse.Project.Module.QUESTORId })); }
/// <summary> /// Writes to the repository file to serialize the data for data storage /// </summary> public void Save() { _responseRepository.Save(); }
public IActionResult Create(Models.Response response) { responseRep.Save(response); return(Redirect("/Questions/Edit/" + response.QuestionId)); }