public IActionResult EditArticle(int Id)
        {
            var article = articleRepository.Get(Id);

            if (article == null)
            {
                return(BadRequest());
            }
            else
            {
                DisplayArticleCategory displayArticleCategory = new DisplayArticleCategory();
                displayArticleCategory.CatForDisplay = categoryRepository.GetAll().ToList();
                displayArticleCategory.Abstract      = article.Abstract;
                displayArticleCategory.Body          = article.Body;
                displayArticleCategory.CategoryId    = article.CategoryId;
                displayArticleCategory.Id            = article.Id;
                displayArticleCategory.ImagePath     = article.Image;
                displayArticleCategory.PublishDate   = article.PublishDate;
                displayArticleCategory.Status        = article.Status;
                displayArticleCategory.Title         = article.Title;
                displayArticleCategory.AspNetUsersId = article.AspNetUsersId;
                displayArticleCategory.ImagePath     = article.Image;
                displayArticleCategory.VideoPath     = article.Video;
                displayArticleCategory.PDFPath       = article.PDF;
                return(View(displayArticleCategory));
            }
        }
        public IActionResult AddArticle()
        {
            DisplayArticleCategory cat = new DisplayArticleCategory();

            cat.CatForDisplay = categoryRepository.GetAll().ToList();
            return(View(cat));
        }
        public IActionResult EditArticleStatus(int Id)
        {
            var article = articleRepository.Get(Id);

            if (article == null)
            {
                return(BadRequest());
            }
            else
            {
                DisplayArticleCategory displayArticleCategory = new DisplayArticleCategory();
                displayArticleCategory.Abstract    = article.Abstract;
                displayArticleCategory.Id          = article.Id;
                displayArticleCategory.PublishDate = article.PublishDate;
                displayArticleCategory.Status      = article.Status;
                displayArticleCategory.Title       = article.Title;
                return(View(displayArticleCategory));
            }
        }