Exemple #1
0
        public ActionResult Create([Bind(Include = "CustomerId,Firstname,Surname,Address1,Address2,Address3,Address4,PostCode,CountryId,DateCreated")] Customer customer)
        {
            if (ModelState.IsValid)
            {
                db.Customers.Add(customer);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(customer));
        }
Exemple #2
0
 public void Save()
 {
     context.SaveChanges();
 }