SHARE
TWEET

Untitled

a guest Aug 19th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>>();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top