Пример #1
0
        public void AddOrder(OrderDataContract order)
        {
            Mapper.Initialize(o => o.CreateMap <OrderDataContract, Order>()
                              .ForMember("User", opt => opt.Ignore()));
            var orderMap = Mapper.Map <OrderDataContract, Order>(order);

            orderMap.UserId = _unitOfWork.UserRepository.GetItemByName(order.User).Id;
            _unitOfWork.OrderRepository.Create(orderMap);
        }
Пример #2
0
 public void AddOrder(OrderDataContract order)
 {
     _service.AddOrder(order);
 }
Пример #3
0
 public void UpdateOrder(OrderDataContract order)
 {
     _service.UpdateOrder(order);
 }
Пример #4
0
 public void DeleteOrder(OrderDataContract order)
 {
     _service.DeleteOrder(order);
 }
Пример #5
0
 public void UpdateOrder(OrderDataContract order)
 {
     throw new NotImplementedException();
 }
Пример #6
0
 public void DeleteOrder(OrderDataContract order)
 {
     _unitOfWork.OrderRepository.Delete(order.Id);
 }