public ActionResult Index() { CommonDataService cds = new CommonDataService(); CommonModel cm = new CommonModel(); cm = cds.GenerateCommonModel(); Session["FaceBook"] = cm.FaceBook; Session["Twitter"] = cm.Twitter; Session["Youtube"] = cm.Youtube; Session["Instagram"] = cm.Instagram; Session["PhoneNumber"] = cm.PhoneNumber; Session["Email"] = cm.Email; Session["ShoppingHours"] = cm.ShoppingHours; CarouselsHelper carHelp = new CarouselsHelper(); HomePageHelper homeHelp = new HomePageHelper(); HomeViewModels hvm = new HomeViewModels(); try { hvm.CarouselsViewModels = carHelp.GenerateCarousels(); hvm.MainViewModels = homeHelp.GenerateMainViewModel(); hvm.FeatureMainModel = homeHelp.GenerateFeatureMainModel(); return(View(hvm)); } catch (Exception ex) { throw ex; } finally { carHelp = null; homeHelp = null; hvm = null; } }