コード例 #1
0
 public ActionResult Edit([Bind(Include = "SifraKontinent,NazivKontinentHr,NazivKontinentEng")] Kontinent kontinent)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kontinent).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(kontinent));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "SifraDrzava,SifraKontinent,GlavniGrad,Zastava,BrojStanovnika,NazivDrzavaHr,NazivDrzavaEng")] Drzava drzava)
 {
     if (ModelState.IsValid)
     {
         db.Entry(drzava).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.SifraKontinent = new SelectList(db.Kontinent, "SifraKontinent", "NazivKontinentHr", drzava.SifraKontinent);
     return(View(drzava));
 }