示例#1
0
        public static void AbpAutoMap(this IMapperConfigurationExpression configuration, params Assembly[] assemblies)
        {
            var types = from assembly in assemblies.Where(c => c != null)
                        from type in assembly.ExportedTypes
                        where type.IsDefined(typeof(AutoMapAttribute)) ||
                        type.IsDefined(typeof(AutoMapFromAttribute)) ||
                        type.IsDefined(typeof(AutoMapToAttribute))
                        select type;

            configuration.AbpAutoMap(types);
        }