public IActionResult DeleteTheme(int themeId) { Theme deletedTheme = themeRepository.DeleteThemeAsync(themeId).Result; if (deletedTheme != null) { TempData["message"] = $"Тема \"{deletedTheme.Name}\" была удалёна"; } return(RedirectToAction("IndexTheme")); }