public ActionResult DeleteConfirmed(int id) { depoTable depoTable = db.depoTable.Find(id); db.depoTable.Remove(depoTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,ad,stok,teminsuresi")] depoTable depoTable) { if (ModelState.IsValid) { db.Entry(depoTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(depoTable)); }
public ActionResult Create([Bind(Include = "id,ad,stok,teminsuresi")] depoTable depoTable) { if (ModelState.IsValid) { db.depoTable.Add(depoTable); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(depoTable)); }
// GET: yoneticidepo/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } depoTable depoTable = db.depoTable.Find(id); if (depoTable == null) { return(HttpNotFound()); } return(View(depoTable)); }