示例#1
0
 public static void DeleteOrderByKey(int id)
 {
     using (OrderUnitOfWork uow = new OrderUnitOfWork())
     {
         using (var rep = new OrderRepository(uow))
         {
             rep.Delete(id);
             uow.Save();
         }
     }
 }
示例#2
0
 public static void AddUpdateOrders(Order order)
 {
     using (OrderUnitOfWork uow = new OrderUnitOfWork())
     {
         using (var rep = new OrderRepository(uow))
         {
             rep.InsertOrUpdate(order);
             uow.Save();
         }
     }
 }