public ActionResult Orders() { sandboxEntities sbxDB = new sandboxEntities(); List <order> orders = (from o in sbxDB.orders select o).ToList(); return(PartialView(orders)); }
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)); }
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("")); }
public ClubController() { edb = new sandboxEntities(); }
public CustomerController() { edb = new sandboxEntities(); }
public HomeController() { edb = new sandboxEntities(); }