Пример #1
0
 public ActionResult Edit([Bind(Include = "Id,Name,Male")] Fluss fluss)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fluss).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(fluss));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Vorname,Familienname,GeborenInId")] Person person)
 {
     if (ModelState.IsValid)
     {
         db.Entry(person).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GeborenInId = new SelectList(db.NamedObjects, "Id", "Name", person.GeborenInId);
     return(View(person));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "Id,Name,LiegtInId")] Stadt stadt)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stadt).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.LiegtInId = new SelectList(db.Laender, "Id", "Name", stadt.LiegtInId);
     return(View(stadt));
 }
Пример #4
0
 public ActionResult Edit([Bind(Include = "Id,Name,HauptStadtId")] Land land)
 {
     if (ModelState.IsValid)
     {
         db.Entry(land).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.HauptStadtId = new SelectList(db.Staedte, "Id", "Name", land.HauptStadtId);
     return(View(land));
 }