public IHttpActionResult PostLPG_DCDetail(LPG_DCDetail lPG_DCDetail)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.LPG_DCDetail.Add(lPG_DCDetail);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (LPG_DCDetailExists(lPG_DCDetail.DCSerial))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = lPG_DCDetail.DCSerial }, lPG_DCDetail));
        }
        public IHttpActionResult PutLPG_DCDetail(int id, LPG_DCDetail lPG_DCDetail)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != lPG_DCDetail.DCSerial)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetLPG_DCDetail(int id)
        {
            LPG_DCDetail lPG_DCDetail = db.LPG_DCDetail.Find(id);

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

            return(Ok(lPG_DCDetail));
        }
        public IHttpActionResult DeleteLPG_DCDetail(int id)
        {
            LPG_DCDetail lPG_DCDetail = db.LPG_DCDetail.Find(id);

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

            db.LPG_DCDetail.Remove(lPG_DCDetail);
            db.SaveChanges();

            return(Ok(lPG_DCDetail));
        }