Is it possible to get just the mapping expression, i.e., an object of type System.Linq.Expressions.Expression<Func<TSource, TTarget>>
? I would like to manually pass it to a Select-like function accepting an expression.
Asked
Active
Viewed 294 times
1 Answers
2
Mapster.TypeAdapterConfig.GlobalSettings.Default.Config.CreateMapExpression(
new Mapster.Models.TypeTuple(typeof(TSource), typeof(TTarget)),
Mapster.MapType.Projection);
Or if you are not using the global config, use your TypeAdapterConfig. Change the MapType to best match what you are trying to do.

Matt Spinder
- 66
- 3