Пример #1
0
        public ActionResult Orders()
        {
            sandboxEntities sbxDB  = new sandboxEntities();
            List <order>    orders = (from o in sbxDB.orders
                                      select o).ToList();

            return(PartialView(orders));
        }
Пример #2
0
        public ActionResult Detail(int ID)
        {
            sandboxEntities sbxDB = new sandboxEntities();
            order           odr   = (from o in sbxDB.orders
                                     where o.id == ID
                                     select o).FirstOrDefault();

            return(PartialView(odr));
        }
Пример #3
0
        public ActionResult DeleteOrder(int ID)
        {
            sandboxEntities sbxDB = new sandboxEntities();

            var odr = new order {
                id = ID
            };

            sbxDB.orders.Attach(odr);
            sbxDB.orders.Remove(odr);
            sbxDB.SaveChanges();

            //List<order> orders = (from o in sbxDB.orders
            //                      select o).ToList();

            //return PartialView("Orders", orders);
            return(Content(""));
        }
Пример #4
0
 public ClubController()
 {
     edb = new sandboxEntities();
 }
Пример #5
0
 public CustomerController()
 {
     edb = new sandboxEntities();
 }
Пример #6
0
 public HomeController()
 {
     edb = new sandboxEntities();
 }