private void RegisterMapping()
        {
            var config = new AutoMapperConfiguration.MapperConfigurationExpression();

            config.ForAllMaps(IgnoreUnmappedProperties);
            AutoMapper.Mapper.Initialize(config);
        }
Example #2
0
        private void RegisterMapping()
        {
            var config = new AutoMapperConfiguration.MapperConfigurationExpression();

            AutoMapperConfig.Configure(config);
            ConfigureMapping(config);
            AutoMapper.Mapper.Initialize(config);
        }
Example #3
0
        public void ConfigureAutoMapper()
        {
            var expression = new AutoMapperConfiguration.MapperConfigurationExpression();

            expression.ConfigureMapping();
            //var config = new MapperConfiguration(expression);
            AutoMapper.Mapper.Initialize(expression);
            //config.AssertConfigurationIsValid();
        }
Example #4
0
        private void Register(ILifetimeScope serviceProvier)
        {
            var mapperConfiguration = new MapperConfiguration.MapperConfigurationExpression();

            IEnumerable <IEntityMapperConfig> configurators = AssemblyFinder.FindAllInterfaces <IEntityMapperConfig>();

            foreach (IEntityMapperConfig mapperConfigurationInstance in configurators)
            {
                mapperConfigurationInstance.Config(mapperConfiguration, serviceProvier);
            }

            Mapper.Initialize(mapperConfiguration);
            IMapper createdMapper = Mapper.Configuration.CreateMapper();

            _mapper = createdMapper;
        }
Example #5
0
 protected void ConfigureMapping(AutoMapperConfiguration.MapperConfigurationExpression config)
 {
     AutoMapperConfig.Configure(config);
 }