public ResultViewModel <MainCategoryEditViewModel> Post(MainCategoryEditViewModel MainCategory)
        {
            ResultViewModel <MainCategoryEditViewModel> result
                = new ResultViewModel <MainCategoryEditViewModel>();

            try
            {
                if (!ModelState.IsValid)
                {
                    result.Message = "In Valid Model State";
                }
                else
                {
                    MainCategoryEditViewModel selectedMainCategory
                        = mainCategoryService.Add(MainCategory);

                    result.Successed = true;
                    Hub.Clients.All.MainCategoryCount(mainCategoryService.Count());

                    result.Data = selectedMainCategory;
                }
            }
            catch (Exception ex)
            {
                result.Successed = false;
                result.Message   = "Semething Went Wrong";
            }
            return(result);
        }
        public Dictionary <string, int> GetData()
        {
            Dictionary <string, int> result = new Dictionary <string, int>();

            result.Add("MainCategoryCount", mainCategoryService.Count());
            result.Add("VisitorCount", ConfigService.Count("VisitorCount"));
            result.Add("trackCount", trackService.Count());
            result.Add("UserCount", userService.Count());

            return(result);
        }