How can I map enums with mapster

348 views Asked by At

I am using Mapster 7.4.0.

I have two enums BaggageFilter and FlightSearchBaggageFilter. Following code does not work for these enums but MapWith works for string types. Does mapster have a bug? Is there any other way to do this? (Sorry for my english)

Expression<Func<BaggageFilter, FlightSearchBaggageFilter>> expression = x => FlightSearchBaggageFilter.Included; 
config.NewConfig<BaggageFilter, FlightSearchBaggageFilter>().MapWith(expression);
0

There are 0 answers