Example #1
0
        public ActionResult AddStore()
        {
            if (Request.Form["name"] != null)
            {
                store store = new store
                {
                    name = Request.Form["name"].ToString(),
                };

                db.stores.InsertOnSubmit(store);

                try
                {
                    db.SubmitChanges();
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                    // Make some adjustments.
                    // ...
                    // Try again.
                    db.SubmitChanges();
                }
                return RedirectToAction("Index", "Stores");
            }
            return View();
        }
Example #2
0
 partial void Deletestore(store instance);
Example #3
0
 partial void Updatestore(store instance);
Example #4
0
 partial void Insertstore(store instance);