示例#1
0
        public ActionResult SaveRecord(CustomerTable model)
        {
            //try
            //{
            ShoppingDatabaseEntities3 db = new ShoppingDatabaseEntities3();

            CustomerTable ct = new CustomerTable();

            ct.Name     = model.Name;
            ct.Phone    = model.Phone;
            ct.Email    = model.Email;
            ct.Password = model.Password;
            db.CustomerTables.Add(ct);

            db.SaveChanges();


            //}
            //catch (Exception ex)
            //{
            //    throw ex;
            //}
            return(RedirectToAction("Register"));
        }