public List <DepartmentModel> GetAll() { try { var Depts = _repo.GetAll(); return(_mapper.Map <List <DepartmentModel> >(Depts)); } catch (Exception ex) { throw ex; } }
public IEnumerable <Dept> Get() { return(deptRepository.GetAll()); }
// GET: Employee/Create public ActionResult Create() { ViewBag.DeptList = new SelectList(deptRepository.GetAll(), "Id", "Name", Dept_Id); ViewBag.DeptId = Dept_Id; return(View()); }
// GET: Dept public ActionResult Index() { return(View(deptRepository.GetAll())); }