public async Task <IActionResult> AssignCategory(List <AssignCategoryModel> list)
        {
            TempData["active"] = "blog";

            int id = (int)TempData["blogId"];

            foreach (var item in list)
            {
                if (item.Exists)
                {
                    CategoryBlogModel model = new CategoryBlogModel();
                    model.BlogId     = id;
                    model.CategoryId = item.CategoryId;
                    await _blogApiService.AddToCategoryAsync(model);
                }
                else
                {
                    CategoryBlogModel model = new CategoryBlogModel();
                    model.BlogId     = id;
                    model.CategoryId = item.CategoryId;
                    await _blogApiService.RemoveFromCategoryAsync(model);
                }
            }

            return(RedirectToAction("Index"));
        }