Hmm, the only thing I could potentially attribute that to is that you have a duplicate property value trying to be added for some reason. That's the only dictionary that seems to get modified within that method.
Do you have duplicate property keys per chance? maybe with different casing?
Issue getting orders with OrderService.SearchOrders
I'm searching for orders with this code:
but it's throwing this error:
An item with the same key has already been added
Hi Ian,
Do you have a stack trace?
Matt
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at Vendr.Core.Persistence.Repositories.OrderRepository.AssignOrderLinesRecursive(OrderState order, OrderLineState parentOrderLine, List1 allOrderLines, List1 allOrderLinePriceAdjustments, List1 allOrderLineProperties, List1 allOrderLineAttributes) at Vendr.Core.Persistence.Repositories.OrderRepository.DoProcessDtos(IEnumerable1 dtos) at Vendr.Core.Persistence.Repositories.OrderRepository.Search(IQuerySpecification1 query, ISortSpecification1 sort, Int64 currentPage, Int64 itemsPerPage) at Vendr.Core.Services.OrderService.SearchOrders(IQuerySpecification1 query, ISortSpecification1 sort, Int64 currentPage, Int64 itemsPerPage) at Vendr.Core.Services.OrderService.SearchOrders(IQuerySpecification1 query, Int64 currentPage, Int64 itemsPerPage) at Vendr.Core.Services.OrderService.SearchOrders(Func2 query, Int64 currentPage, Int64 itemsPerPage)
Hmm, the only thing I could potentially attribute that to is that you have a duplicate property value trying to be added for some reason. That's the only dictionary that seems to get modified within that method.
Do you have duplicate property keys per chance? maybe with different casing?
Matt
Hi Matt,
I think its some duff data in the database. Running against a copy of the live database I don't see the issue.
Sorry for wasting your time!!
is working on a reply...