Ejemplo n.º 1
0
        // [ResponseCache(CacheProfileName = "Component")]
        public async Task <IActionResult> Index()
        {
            try
            {
                homeViewModels.TopNewsByCate = await newDAL.GetListByCate();

                homeViewModels.listCatetop = await dmDAL.GetListcateNews();

                homeViewModels.ImageGallery = await imgDAL.GetImageServiceByType(3);

                homeViewModels.FeedbackNumber = await imgDAL.GetImageServiceByType(4);

                homeViewModels.InfoContact = await ctDAL.GetAllList();

                homeViewModels.ListTopHot = await newDAL.GetListTophot(5);

                homeViewModels.ImgService = await imgDAL.GetImageService();
            }
            catch (Exception ex)
            {
                _logger.LogWarning(ex.Message.ToString());
            }


            return(View(homeViewModels));
        }