Exemplo n.º 1
0
        public async Task <ActionResult> DeleteEmbeddedResource(int id)
        {
            try
            {
                await _context.DeleteEmbeddedResource(id);

                return(new NoContentResult());
            }
            catch (ControllerNotFoundException e)
            {
                return(NotFound(e.Message));
            }
            catch (ControllerBadRequestException e)
            {
                return(BadRequest(e.Message));
            }
            catch (ControllerUnauthorizedException)
            {
                return(new UnauthorizedResult());
            }
        }