public async Task <IActionResult> Deactivate(ArticleCategoryIdRequestModel request) { if (!ModelState.IsValid) { return(RedirectToErrorPage()); } var isInactived = await _articleCategoryService.DeactivateAsync(new ArticleCategoryModifyRequest { Id = request.Id, UpdatedById = LoggedUserId }); if (!isInactived) { return(RedirectToErrorPage()); } if (request.ShouldKeepUpdatePage) { return(RedirectToAction(nameof(Update), new { id = request.Id })); } return(RedirectToAction(nameof(Index))); }