public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var obj = await _curriculumService.FindByIdAsync(id); if (obj == null) { return(NotFound()); } ViewBag.items = new SelectList(await _coursesService.FindAllAsync(), "Id", "Type"); return(View(obj)); }
// EDIT GET: public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var obj = await _academicService.FindByIdAsync(id); TempData["id"] = obj.CurriculumId; ViewBag.items = new SelectList(await _coursesService.FindAllAsync(), "Id", "Type"); if (obj == null) { return(NotFound()); } return(View(obj)); }