// POST: odata/T_RTRPT_PUMP_HIS
        public IHttpActionResult Post(T_RTRPT_PUMP_HIS T_RTRPT_PUMP_HIS)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.T_RTRPT_PUMP_HIS.Add(T_RTRPT_PUMP_HIS);
            db.SaveChanges();

            return(Created(T_RTRPT_PUMP_HIS));
        }
        // DELETE: odata/T_RTRPT_PUMP_HIS(5)
        public IHttpActionResult Delete([FromODataUri] int key)
        {
            T_RTRPT_PUMP_HIS T_RTRPT_PUMP_HIS = db.T_RTRPT_PUMP_HIS.Find(key);

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

            db.T_RTRPT_PUMP_HIS.Remove(T_RTRPT_PUMP_HIS);
            db.SaveChanges();

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult Patch([FromODataUri] int key, Delta <T_RTRPT_PUMP_HIS> patch)
        {
            Validate(patch.GetEntity());

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            T_RTRPT_PUMP_HIS T_RTRPT_PUMP_HIS = db.T_RTRPT_PUMP_HIS.Find(key);

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

            patch.Patch(T_RTRPT_PUMP_HIS);

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

            return(Updated(T_RTRPT_PUMP_HIS));
        }