将 AutoMapper 由 7.0 升级至 8.0 后,下面的代码
cfg.CreateMap<JobOffer, Document>().ConstructUsing(j =>
{
//...
});
Build 时报错
A lambda expression with a statement body cannot be converted to an expression tree
请问如何解决?
相关问题
- How to ignore properties of a specific type when u
- EF Core - Return mapped Many-to-Many relationship
- Validation of nested models in view model in ASP.N
- Using string.Split() in AutoMapper issue
- Mapping from two items with automapper
相关文章
- automapper 对 查询出来的 entity 跟新值
- Automapper - Ignore mapping with condition
- Automapper and request specific resources
- Mapping Child Collections using AutoMapper
- AutoMapper 8.0 missing GetPropertyMaps
- AutoMapper for a list scenario only seems to repea
- Configuring Automapper in N-Layer application
- AutoMapper.AutoMapperMappingException: Error mappi
改为下面的代码解决了