Пример #1
0
 public ActionResult Edit(Patron patron)
 {
     db.Entry(patron).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Пример #2
0
        public ActionResult Patrons()
        {
            List <Patron> allPatrons = Patron.GetAll();

            return(View(allPatrons));
        }
Пример #3
0
 public ActionResult Create(Patron patron)
 {
     db.Patrons.Add(patron);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }