Exemplo n.º 1
0
        public static List <Order> All()
        {
            OrderSQLContext osc = new OrderSQLContext();
            OrderRepository or  = new OrderRepository(osc);

            return(or.RetrieveAll());
        }
Exemplo n.º 2
0
        public static Order Find(string key)
        {
            OrderSQLContext osc = new OrderSQLContext();
            OrderRepository or  = new OrderRepository(osc);

            return(or.Retrieve(key));
        }
Exemplo n.º 3
0
        public static List <Order> FindOrderByGebruikerId(int gebruikerId)
        {
            OrderSQLContext osc = new OrderSQLContext();
            OrderRepository or  = new OrderRepository(osc);

            return(or.RetrieveByGebruikerId(gebruikerId));
        }
Exemplo n.º 4
0
        public void All()
        {
            OrderSQLContext osc   = new OrderSQLContext();
            List <Order>    oList = osc.RetrieveAll();

            Assert.IsTrue(oList.Count > 0);
        }
Exemplo n.º 5
0
        public void SaveOrUpdate()
        {
            OrderSQLContext osc = new OrderSQLContext();
            OrderRepository or  = new OrderRepository(osc);

            if (Id != 0)
            {
                or.Update(this);
            }
            else
            {
                or.Create(this);
            }
        }
Exemplo n.º 6
0
        public void Delete()
        {
            OrderSQLContext osc = new OrderSQLContext();

            osc.Delete("29");
        }
Exemplo n.º 7
0
 public void Find()
 {
     OrderSQLContext osc = new OrderSQLContext();
     Order           o   = osc.Retrieve("25");
 }