Beispiel #1
0
        public async Task <IActionResult> Delete(Guid id)
        {
            var deleted = await _grupoService.DeleteAsync(id);

            if (deleted)
            {
                return(Ok());
            }
            return(NotFound());
        }
Beispiel #2
0
        public async Task <IActionResult> Delete(string GrupoId)
        {
            try
            {
                await _grupoService.DeleteAsync(GrupoId);

                return(Ok(GrupoId));
            }
            catch (CannotDeleteException ex)
            {
                return(UnprocessableEntity(ex.Message));
            }
        }