Exemple #1
0
        //need to be using ef clauses dbcontext here



        public IEnumerable <Orders> getId(int Id)
        {
            using (var db = new PizzaDB2Context()) {
                return(db.Orders.Where(o => o.Id == Id));
            }
        }
Exemple #2
0
 public IEnumerable <Orders> getStoreAddressID(int StoreAddressId)
 {
     using (var db = new PizzaDB2Context()){
         return(db.Orders.Where(o => o.StoreAddressID == StoreAddressId));
     }
 }
Exemple #3
0
 public OrdersRepository(PizzaDB2Context db)
 {
     Db = db;
 }
Exemple #4
0
 public IEnumerable <Orders> getUserOrderAddressId(int UserOrderAddressId)
 {
     using (var db = new PizzaDB2Context()){
         return(db.Orders.Where(o => o.UserOrderAddressID == UserOrderAddressId));
     }
 }
Exemple #5
0
 public OrderedPizzasRepository(OrderedPizzasRepository db)
 {
     Db = db;
 }