public IHttpActionResult PostITEM_FACTURABLE(ITEM_FACTURABLE iTEM_FACTURABLE)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.ITEM_FACTURABLE.Add(iTEM_FACTURABLE);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (ITEM_FACTURABLEExists(iTEM_FACTURABLE.GUID))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = iTEM_FACTURABLE.GUID }, iTEM_FACTURABLE));
        }
        public IHttpActionResult PutITEM_FACTURABLE(Guid id, ITEM_FACTURABLE iTEM_FACTURABLE)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != iTEM_FACTURABLE.GUID)
            {
                return(BadRequest());
            }

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

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ITEM_FACTURABLEExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetITEM_FACTURABLE(Guid id)
        {
            ITEM_FACTURABLE iTEM_FACTURABLE = db.ITEM_FACTURABLE.Find(id);

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

            return(Ok(iTEM_FACTURABLE));
        }
        public IHttpActionResult DeleteITEM_FACTURABLE(Guid id)
        {
            ITEM_FACTURABLE iTEM_FACTURABLE = db.ITEM_FACTURABLE.Find(id);

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

            db.ITEM_FACTURABLE.Remove(iTEM_FACTURABLE);
            db.SaveChanges();

            return(Ok(iTEM_FACTURABLE));
        }