Пример #1
0
 public List <DepartmentModel> GetAll()
 {
     try
     {
         var Depts = _repo.GetAll();
         return(_mapper.Map <List <DepartmentModel> >(Depts));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
 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());
 }
Пример #4
0
 // GET: Dept
 public ActionResult Index()
 {
     return(View(deptRepository.GetAll()));
 }