public ActionResult Create([Bind(Include = "id,name,animal,size,food,photo,customer_id,active,indoors_safe,under13_safe")] Pet pet) { if (ModelState.IsValid) { db.Pets.Add(pet); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(pet)); }
public ActionResult Register(Customer X) { if (ModelState.IsValid) { using (PetBucketDatabaseEntities db = new PetBucketDatabaseEntities()) { db.Customers.Add(X); db.SaveChanges(); ModelState.Clear();