public async Task <IActionResult> DeleteSectionConfirmed(long id) { if (ModelState.IsValid) { int result = await _repository.DeleteSectionAsync(id); if (result == -5) { TempData["SectionMessage"] = _stringLocalizer["Nothing deleted"].ToString(); } else if (result == 1) { TempData["SectionMessage"] = _stringLocalizer["Section Deleted successfully"].ToString(); } } return(RedirectToAction(nameof(Index))); }