Closed IngoManthey closed 5 years ago
Use MapFrom instead. This is documented in the automapper upgrade guide: http://docs.automapper.org/en/latest/8.0-Upgrade-Guide.html#resolveusing
Get the latest version that reflects this changes: https://github.com/emonney/QuickApp/blob/fe7d4ac1828ebf083034f00f2f8e97a44d75f428/src/QuickApp/ViewModels/AutoMapperProfile.cs#L35
Hi, When I compile the program with Automapper 8.0.0, I get an error message saying ResolveUsing no longer exists. What can I do?
CreateMap<ApplicationRole, RoleViewModel>() .ForMember(d => d.Permissions, map => map.MapFrom(s => s.Claims)) .ForMember(d => d.UsersCount, map => map.ResolveUsing(s => s.Users?.Count ?? 0)) .ReverseMap();