public IHttpActionResult Putgeo_manage(int id, geo_manage geo_manage) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != geo_manage.Id) { return(BadRequest()); } db.Entry(geo_manage).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!geo_manageExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult Getgeo_manage(int id) { geo_manage geo_manage = db.geo_manage.Find(id); if (geo_manage == null) { return(NotFound()); } return(Ok(geo_manage)); }
public IHttpActionResult Postgeo_manage(geo_manage geo_manage) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.geo_manage.Add(geo_manage); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = geo_manage.Id }, geo_manage)); }
public IHttpActionResult Deletegeo_manage(int id) { geo_manage geo_manage = db.geo_manage.Find(id); if (geo_manage == null) { return(NotFound()); } db.geo_manage.Remove(geo_manage); db.SaveChanges(); return(Ok(geo_manage)); }