System.ArgumentException: An item with the same key has already been added.
Hi Matt,
I'm getting the following error when using the _orderService.GetOrder(GUID orderId);
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Vendr.Core.Persistence.Repositories.OrderRepository.AssignOrderLinesRecursive(OrderState order, OrderLineState parentOrderLine, List`1 allOrderLines, List`1 allOrderLinePriceAdjustments, List`1 allOrderLineProperties, List`1 allOrderLineAttributes)
at Vendr.Core.Persistence.Repositories.OrderRepository.DoProcessDtos(IEnumerable`1 dtos)
at Vendr.Core.Persistence.Repositories.OrderRepository.DoFetchInternal(IDatabaseUnitOfWork uow, String sql, Object[] args)
at Vendr.Core.Persistence.Repositories.OrderRepository.Get(Guid id)
at Vendr.Core.Services.OrderService.PerformGetState(Guid id)
at Vendr.Core.Cache.DefaultEntityStatePolicyCache`2.Get(TId id, Func`2 performGet, Func`2 performGetAll)
at Vendr.Core.Services.OrderService.GetOrderState(Guid id)
at Vendr.Core.Services.OrderService.GetOrder(Guid id)
Ok, my best initial guess is that you have 2 order lines properties defined on an order line but potentially their key casing is different. You might need to check your DB for duplicates for the same order line and see if it's a casing thing.
System.ArgumentException: An item with the same key has already been added.
Hi Matt, I'm getting the following error when using the _orderService.GetOrder(GUID orderId);
Any ideas on what could be causing this?
Hi,
Could you please state which version of Vendr you are using along with any add-ons such as Vendr.Checkout.
Hi Matt, we are using vendr 1.8.6-beta0007 attached all the vendr packages we have installed, not using Vendr.Checkout
Ok, my best initial guess is that you have 2 order lines properties defined on an order line but potentially their key casing is different. You might need to check your DB for duplicates for the same order line and see if it's a casing thing.
Matt
is working on a reply...