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