public JsonResult Index()
        {
            var apiResult = TryExecute(() =>
            {
                return(_leaveEntitlementRepository.GetAll().Select(h => new LeaveEntitlementModel(h)).ToList());
            }, "Leave Entitlements Fetched sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult Index()
        {
            var leaveEntitlements = _leaveEntitlementRepository.GetAll();

            return(View(leaveEntitlements));
        }