public IActionResult AddPost(AddPostVM viewModel, string command)
 {
     if (command.Equals("submit2"))
     {
         _postsRepository.AddNewCategory(viewModel);
         return(RedirectToAction("addpost", "admin"));
     }
     else
     {
         if (!ModelState.IsValid)
         {
             return(View(viewModel));
         }
         _postsRepository.AddPost(viewModel, "Administrator");
         return(RedirectToAction("index", "home"));
     }
 }