public IHttpActionResult PostTBL_SORUN_(TBL_SORUN_ tBL_SORUN_) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.TBL_SORUN_.Add(tBL_SORUN_); try { db.SaveChanges(); } catch (DbUpdateException) { if (TBL_SORUN_Exists(tBL_SORUN_.Id)) { return(Conflict()); } else { throw; } } return(CreatedAtRoute("DefaultApi", new { id = tBL_SORUN_.Id }, tBL_SORUN_)); }
public IHttpActionResult PutTBL_SORUN_(int id, TBL_SORUN_ tBL_SORUN_) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tBL_SORUN_.Id) { return(BadRequest()); } db.Entry(tBL_SORUN_).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!TBL_SORUN_Exists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public ActionResult DeleteConfirmed(int id) { TBL_SORUN_ tBL_SORUN_ = db.TBL_SORUN_.Find(id); db.TBL_SORUN_.Remove(tBL_SORUN_); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Yetkili,Bolge,Aciklama")] TBL_SORUN_ tBL_SORUN_) { if (ModelState.IsValid) { db.Entry(tBL_SORUN_).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_SORUN_)); }
public IHttpActionResult GetTBL_SORUN_(int id) { TBL_SORUN_ tBL_SORUN_ = db.TBL_SORUN_.Find(id); if (tBL_SORUN_ == null) { return(NotFound()); } return(Ok(tBL_SORUN_)); }
public ActionResult Create([Bind(Include = "Id,Yetkili,Bolge,Aciklama")] TBL_SORUN_ tBL_SORUN_) { if (ModelState.IsValid) { db.TBL_SORUN_.Add(tBL_SORUN_); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tBL_SORUN_)); }
public IHttpActionResult DeleteTBL_SORUN_(int id) { TBL_SORUN_ tBL_SORUN_ = db.TBL_SORUN_.Find(id); if (tBL_SORUN_ == null) { return(NotFound()); } db.TBL_SORUN_.Remove(tBL_SORUN_); db.SaveChanges(); return(Ok(tBL_SORUN_)); }
// GET: SorunTable/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TBL_SORUN_ tBL_SORUN_ = db.TBL_SORUN_.Find(id); if (tBL_SORUN_ == null) { return(HttpNotFound()); } return(View(tBL_SORUN_)); }