public IActionResult EditPathwaySteps(string editid) { var pathwaystep = _peopleRepository.FindById(editid); var pathwayid = pathwaystep.PathwayId; var issuerid = pathwaystep.IssuerId; List <PathwaySteps> all = _peopleRepository.AsQueryable().ToList(); List <PathwaySteps> list = all.Where(e => e.PathwayId == pathwayid).ToList(); if (list == null) { ModelState.AddModelError(string.Empty, "Pathway id is null"); } PathwayCreation pathwayCreation = new PathwayCreation() { GetBadgesinList = _badge.FilterBy(e => e.IssuerId == issuerid).ToList(), Id = new ObjectId(editid), StepName = pathwaystep.StepName, Description = pathwaystep.Description, Documents = pathwaystep.Documents, GetBadges = pathwaystep.GetBadges, PathwayId = pathwaystep.PathwayId, IssuerId = pathwaystep.IssuerId }; return(View(pathwayCreation)); }
public IActionResult ManagePathway(string id) { var path = _path.FindById(id); var issuerid = path.IssuersId; List <PathwaySteps> all = _peopleRepository.AsQueryable().ToList(); List <PathwaySteps> list = all.Where(e => e.PathwayId == id).ToList(); if (list == null) { ModelState.AddModelError(string.Empty, "Pathway id is null"); } PathwayCreation pathwayCreation = new PathwayCreation() { GetBadgesinList = _badge.FilterBy(e => e.IssuerId == issuerid).ToList(), steps = list, pathwayName = path.PathwayName }; return(View(pathwayCreation)); }