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)));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> DeleteInstitution(int id, CancellationToken ct)
        {
            var action = await _instituService.DeleteInstitutionAsync(id, ct);

            return(Ok(action));
        }