public ActionResult Index(CreateFeaturedModel model)
        {
            if (!ModelState.IsValid) return Json(-100);

            //insert featured
            var result = _featuredService.InsertFeatured(model);

            if (result != 1) return Json(result);

            //reload Featured cache
            _listingService.UpdateCache(new XBCacheReloadObject
            {
                moduleName = "Featured2",
                objectType = "MuaBanNhaDatLib.Business.Advert.Model.FeaturedAdvertModel",
                //loginId = Session["userId"].ToString()
            });

            if (model.Type == 3)
            {
                _listingService.UpdateCache(new XBCacheReloadObject
                {
                    moduleName = "search",
                    //loginId = Session["userId"].ToString()
                });
            }

            ReloadCache();
            return Json(result);
        }
 public int InsertFeatured(CreateFeaturedModel model)
 {
     using (var sql = GetSqlConnection())
     {
         var data = sql.Query<int>("InsertFeatured", model, commandType: CommandType.StoredProcedure);
         sql.Close();
         return data.FirstOrDefault();
     }
 }