Ejemplo n.º 1
0
        public static void RemoveOrder(OrderModel model)
        {
            UnitOfWorkRepository unitOfWork = new UnitOfWorkRepository();
            var order = OrderFactory.ConvertOrderModel(model);

            unitOfWork.OrderRepository.RemoveOrder(order.Id);
        }
Ejemplo n.º 2
0
        public static OrderModel AddOrder(OrderModel orderMod)
        {
            UnitOfWorkRepository unitOfWork = new UnitOfWorkRepository();

            orderMod.Id = Guid.NewGuid();
            var order = OrderFactory.ConvertOrderModel(orderMod);

            unitOfWork.OrderRepository.AddOrder(order);
            return(orderMod);
        }