问题
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