MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.31k stars 328 forks source link

MapContext.Current is null #457

Closed sonsy-soft closed 2 years ago

sonsy-soft commented 2 years ago

after i run the program

in mapping configuration class : Iregister

i use MapContext.current to get service but it will be null

.Map(dest => dest.MiniID, src => MapContext.Current.GetService<IMinifyNumber>().Encode(src.Id))

eception

Mapping must be called using ServiceAdapter