public async Task <ActionResult> DeleteCommand(int?id) { var institution = _institutionService.GetInstitutions().FirstOrDefault(x => x.Id == id.Value); await _institutionService.DeleteInstitutionAsync(institution); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> DeleteInstitution(int id, CancellationToken ct) { var action = await _instituService.DeleteInstitutionAsync(id, ct); return(Ok(action)); }