What does AutoMapper MapAtRuntime() do?

拜拜、爱过 提交于 2020-04-14 09:13:08

问题


I have seen MapAtRuntime() function in AutoMapper, and this is the explanation that I get from intellisense:

Do not precompute the execution plan for this member, just map it at runtime. Simplifies the execution plan by not inlining.

But what does it actually do? And how/when should I use it?

// I don't know if this is the correct usage, and what difference does it make
CreateMap<MyEntity, MyViewModel>()
    .ForMember(dest => dest.MyField, opt => opt.MapAtRuntime());

I have not been able to find any documentation on this, just the source code on GitHub:

来源:https://stackoverflow.com/questions/54967828/what-does-automapper-mapatruntime-do

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!