Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
  2. at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
  3. at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
  4. at Mapster.TypeAdapterConfig.Remove(TypeTuple key)
  5. at Mapster.TypeAdapterConfig.NewConfig[TSource,TDestination]()
  6. at InventoryService.GetCategories(Int32 inventoryCenterId)
  7. at Controllers.InventoriesController.GetCategories(Int32 centerId)
  8.  
  9. TypeAdapterConfig<Category, CategoryDto>
  10. .NewConfig()
  11. .IgnoreIf((src, dest) => string.IsNullOrEmpty(src.MetaTitle), dest => dest.MetaTitle)
  12. .IgnoreIf((src, dest) => string.IsNullOrEmpty(src.MetaDescription), dest => dest.MetaDescription);
  13.  
  14. var categories = dbContext.Centers.Where(x => x.Id == CenterId).SelectMany(x => x.Categories).OrderBy(x => x.Name).ToList();
  15. return categories.Adapt<List<CategoryDto>>();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement