automapper - AutoMapper MapAtRuntime() 有什么作用?
问题描述
我MapAtRuntime()
在 AutoMapper 中看到了函数,这是我从智能感知得到的解释:
不要预先计算该成员的执行计划,只需在运行时映射它。通过不内联来简化执行计划。
但它实际上做了什么?我应该如何/何时使用它?
// 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());
我还没有找到任何关于这方面的文档,只有GitHub 上的源代码:
解决方案
推荐阅读
- python - 如何以直观的方式格式化使用请求库下载的 CSV 数据?
- c++ - Qt5:使用 QCommandLineParser 类时出现奇怪的编译错误
- python - 如何从python中具有特定长度的文件中的列表中选择一个随机单词
- javascript - Crud 实时 SSE?
- asp.net-core - 如何从另一个 Razor 页面调用方法?
- html - 使用 HTML Width CSS 创建大型 CLS,有没有更有效的方法?
- typescript - 带有 typescript 的 Web 项目的 MSBUILD 会引发大量与 JQuery 相关的错误
- python - Python:如何将用户输入元素附加到空列表
- laravel - 仅在发送标头时出现 Cors
- python - python制表:显示特定值的空白单元格