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

            db.T_GJSWZ.Add(T_GJSWZ);
            db.SaveChanges();

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

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

            db.T_GJSWZ.Remove(T_GJSWZ);
            db.SaveChanges();

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

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

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

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

            patch.Patch(T_GJSWZ);

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

            return(Updated(T_GJSWZ));
        }