public ActionResult Edit(int id, ProdavnicaProizvodi proizvodi) { try { using (ProdavnicaEntities db = new ProdavnicaEntities()) { db.Entry(proizvodi).State = EntityState.Modified; db.SaveChanges(); } return(RedirectToAction("AdminProdavnica")); } catch { return(View()); } }
public ActionResult Edit1(int id, Korisnik korisnik) { try { using (ProdavnicaEntities db = new ProdavnicaEntities()) { db.Entry(korisnik).State = EntityState.Modified; db.SaveChanges(); } return(RedirectToAction("Korisnici")); } catch { return(View()); } }