Random “Missing type map configuration or unsupported mapping.” Error in Automapper

前端 未结 2 1416
梦如初夏
梦如初夏 2021-01-26 09:47

Please see this post for the solution.

Ok, I finally figured it out. The: AppDomain.CurrentDomain.GetAssemblies() piece of my code sometimes does not

2条回答
  •  一个人的身影
    2021-01-26 10:26

    For me this error had to do with where I put my CreateMap<>() call. I had put it in the static initializer for my DTO. When I moved the CreateMap<>() call to somewhere less cute, everything worked fine.

提交回复
热议问题