完成权限点对点

This commit is contained in:
橙子
2022-01-11 16:40:15 +08:00
parent 5a9b37ffa6
commit f624a24a82
22 changed files with 319 additions and 49 deletions

View File

@@ -28,5 +28,13 @@ namespace Yi.Framework.WebCore.Mapper
IMapper mapper = new AutoMapper.Mapper(config);
return mapper.Map<Source, Target>(source);
}
public static List<Target> MapList<Target, Source>(List<Source> source)
{
var cfg = new MapperConfigurationExpression();
cfg.CreateMap<Source, Target>();
var config = new MapperConfiguration(cfg);
IMapper mapper = new AutoMapper.Mapper(config);
return mapper.Map<List<Source>, List<Target>>(source);
}
}
}