Exemple #1
0
        // POST: odata/T_RTRPT_PUMP_KTMXBWSO2
        public IHttpActionResult Post(T_RTRPT_PUMP_KTMXBWSO2 T_RTRPT_PUMP_KTMXBWSO2)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.T_RTRPT_PUMP_KTMXBWSO2.Add(T_RTRPT_PUMP_KTMXBWSO2);
            db.SaveChanges();

            return(Created(T_RTRPT_PUMP_KTMXBWSO2));
        }
Exemple #2
0
        // DELETE: odata/T_RTRPT_PUMP_KTMXBWSO2(5)
        public IHttpActionResult Delete([FromODataUri] decimal key)
        {
            T_RTRPT_PUMP_KTMXBWSO2 T_RTRPT_PUMP_KTMXBWSO2 = db.T_RTRPT_PUMP_KTMXBWSO2.Find(key);

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

            db.T_RTRPT_PUMP_KTMXBWSO2.Remove(T_RTRPT_PUMP_KTMXBWSO2);
            db.SaveChanges();

            return(StatusCode(HttpStatusCode.NoContent));
        }
Exemple #3
0
        public IHttpActionResult Patch([FromODataUri] decimal key, Delta <T_RTRPT_PUMP_KTMXBWSO2> patch)
        {
            Validate(patch.GetEntity());

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

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

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

            patch.Patch(T_RTRPT_PUMP_KTMXBWSO2);

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

            return(Updated(T_RTRPT_PUMP_KTMXBWSO2));
        }