public async Task <IActionResult> Update(UpdateArticleInputModel input)
        {
            if (this.User.IsInRole("Administrator"))
            {
                if (!this.ModelState.IsValid)
                {
                    return(this.View(input));
                }

                await this.articlesService.Update(input.Id, input.Content, input.CategoryId, input.Title);

                return(this.RedirectToAction("Details", new { id = input.Id }));
            }
            return(this.RedirectToAction("Index", "Home"));
        }
        public async Task <IActionResult> Update(UpdateArticleInputModel input)
        {
            if (!this.ModelState.IsValid)
            {
                input.Categories = await this.categoriesService.GetAllAsSelectListItemAsync();

                input.Picture = await this.articlesService.GetPictureUrlAsync(input.Id);

                return(this.View(input));
            }

            await this.articlesService.UpdateAsync(input.Title, input.Content, input.CategoryId, input.NewPicture, input.Id);

            this.TempData["InfoMessage"] = GlobalMessages.SuccessUpdateMessage;

            return(this.RedirectToAction(nameof(this.GetAllForStylist)));
        }