public async Task <ActionResult> DeleteConfirm(string id) { try { await _repository.RemoveByNameAsync(id); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }