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

            db.TB_DATASERVER.Add(TB_DATASERVER);
            db.SaveChanges();

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

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

            db.TB_DATASERVER.Remove(TB_DATASERVER);
            db.SaveChanges();

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

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

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

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

            patch.Patch(TB_DATASERVER);

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

            return(Updated(TB_DATASERVER));
        }