public IActionResult EditWithSubject(int id) { var data = repo.Get(id); if (data == null) { return(NotFound()); } return(View(data)); }
public IActionResult create() { var data = department.Get(); ViewBag.depts = new SelectList(data, "id", "DepartmentName"); var data2 = country.Get(); ViewBag.countries = new SelectList(data2, "Id", "CountryName"); return(View()); }
public IActionResult GetDepartments() { return(Ok(_mapper.Map <IEnumerable <DepartmentDTO> >(_departmentRepo.Get()))); }
public IActionResult Index() { return(View(repo.Get())); }