5.0版本的初始化配置改成如下方式了 Mapper.Initialize(cfg => { cfg.CreateMap<User, UserDto>(); })
在做查询的时候可以直接使用ProjectTo()映射