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