public IHttpActionResult DeleteEntrada(long id)
        {
            Entrada entrada = entradaService.Read(id);

            if (entrada == null)
            {
                return(NotFound());
            }

            entradaService.Delete(id);

            return(Ok(entrada));
        }
示例#2
0
        public IHttpActionResult DeleteEntrada(long id)
        {
            Entrada entrada;

            try
            {
                entrada = entradasService.Delete(id);
            }
            catch (NoEncontradoException)
            {
                return(NotFound());
            }

            return(Ok(entrada));
        }