automapper 非依赖注入方式工具类

public class MappingProfile
{
private static MapperConfiguration _config = new MapperConfiguration(cfg =>
{
cfg.CreateMap<PredictionParams, PredictionParamsStruct>();
cfg.CreateMap<PredictionParamsStruct, PredictionParams>();
});

public static IMapper Mapper = _config.CreateMapper();
}

posted on 2023-03-16 09:38  gfbppy  阅读(9)  评论(0编辑  收藏  举报

导航