Beispiel #1
0
        public ActionResult EditCustomer(int id, Customer newcustomer)
        {
            if (ModelState.IsValid)
            {
                using (ProductFirstVersionEntities dbobj = new ProductFirstVersionEntities())
                {
                    dbobj.Entry(newcustomer).State = EntityState.Modified;
                    dbobj.SaveChanges();

                    return(RedirectToAction("Customer"));
                }
            }
            return(View());
        }
Beispiel #2
0
        public ActionResult EditStore(int id, Store newstore)
        {
            if (ModelState.IsValid)
            {
                using (ProductFirstVersionEntities dbobj = new ProductFirstVersionEntities())
                {
                    dbobj.Entry(newstore).State = EntityState.Modified;
                    dbobj.SaveChanges();

                    return(RedirectToAction("Store"));
                }
            }
            return(View());
        }