public ActionResult Index(string message = "") { LayoutModel layout = LayoutService.GetLayout(1); layout.FrontCategory1 = CategoryService.GetProductCategory(layout.FrontCategoryBanner1Id); layout.FrontCategory2 = CategoryService.GetProductCategory(layout.FrontCategoryBanner2Id); layout.FrontCategory3 = CategoryService.GetProductCategory(layout.FrontCategoryBanner3Id); var layoutView = Mapper.Map <LayoutModel, LayoutViewModel>(layout); layoutView.Message = message; return(View(layoutView)); }