Example #1
0
        private static void RegisterAutoMapper(ContainerBuilder builder)
        {
            Assembly[] assemblies = AssembliesProvider.GetBreadAssemblies();

            var mapperConfiguration =
                new MapperConfiguration(
                    config =>
            {
                config.AllowNullCollections = true;
                config.AddMaps(assemblies);
            }
                    );

            IMapper mapper = mapperConfiguration.CreateMapper();

            builder.RegisterInstance(mapper);
        }
Example #2
0
        public static void RegisterAssemblyModules(ContainerBuilder builder)
        {
            Assembly[] assemblies = AssembliesProvider.GetBreadAssemblies();

            builder.RegisterAssemblyModules(assemblies);
        }