public IActionResult CreateStep(Step step) { stepRepo.Save(step); ViewBag.thisStep = stepRepo.Steps .Include(p => p.Project) .ThenInclude(m => m.Module) .ThenInclude(q => q.QUESTOR) .FirstOrDefault(x => x.StepId == step.StepId); var thisStep = stepRepo.Steps.FirstOrDefault(x => x.StepId == step.StepId); return(RedirectToAction("Edit", "QUESTORs", new { id = ViewBag.thisStep.Project.Module.QUESTORId })); }