Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Sities sities = db.Sities.Find(id);

            db.Sities.Remove(sities);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Sity")] Sities sities)
        {
            if (ModelState.IsValid)
            {
                db.Sities.Add(sities);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sities));
        }
Esempio n. 4
0
        // 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));
        }