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); }
public void AddOrder(OrderDataContract order) { _service.AddOrder(order); }
public void UpdateOrder(OrderDataContract order) { _service.UpdateOrder(order); }
public void DeleteOrder(OrderDataContract order) { _service.DeleteOrder(order); }
public void UpdateOrder(OrderDataContract order) { throw new NotImplementedException(); }
public void DeleteOrder(OrderDataContract order) { _unitOfWork.OrderRepository.Delete(order.Id); }