public ActionResult Index() { List <PageContent> obj = _repPageContent.GetList().ToList(); List <PageContentModel> objPageContent = PageContentMap.Map(obj); if (objPageContent.Count == 0) { TempData[LeonniConstants.ErrorMessage] = "Record Not Found !"; } ViewBag.Contents = "current"; return(View(objPageContent)); }