Ejemplo n.º 1
0
        public IActionResult Delete(int id)
        {
            var retVal = _droneService.Remove(id);

            if (retVal == 0)
            {
                return(NotFound());  //Not Found 404
            }
            else if (retVal == -1)
            {
                return(StatusCode(412, "DbUpdateConcurrencyException"));  //Precondition Failed  - concurrency
            }
            else
            {
                return(NoContent());          //No Content 204
            }
        }