public async Task <IHttpActionResult> PostRECOJO_DETALLE(RECOJO_DETALLE rECOJO_DETALLE)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.RECOJO_DETALLE.Add(rECOJO_DETALLE);

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (RECOJO_DETALLEExists(rECOJO_DETALLE.TOKEN_RECOJO_DETALLE))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = rECOJO_DETALLE.TOKEN_RECOJO_DETALLE }, rECOJO_DETALLE));
        }
        public async Task <IHttpActionResult> PutRECOJO_DETALLE(string id, RECOJO_DETALLE rECOJO_DETALLE)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != rECOJO_DETALLE.TOKEN_RECOJO_DETALLE)
            {
                return(BadRequest());
            }

            db.Entry(rECOJO_DETALLE).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!RECOJO_DETALLEExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GetRECOJO_DETALLE(string id)
        {
            RECOJO_DETALLE rECOJO_DETALLE = await db.RECOJO_DETALLE.FindAsync(id);

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

            return(Ok(rECOJO_DETALLE));
        }
        public async Task <IHttpActionResult> DeleteRECOJO_DETALLE(string id)
        {
            RECOJO_DETALLE rECOJO_DETALLE = await db.RECOJO_DETALLE.FindAsync(id);

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

            db.RECOJO_DETALLE.Remove(rECOJO_DETALLE);
            await db.SaveChangesAsync();

            return(Ok(rECOJO_DETALLE));
        }