Beispiel #1
0
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(AbpZeroCoreSampleAppModule).GetAssembly());

            var genericRepositoryRegistarar = IocManager.Resolve <EfGenericRepositoryRegistrar>();

            genericRepositoryRegistarar.RegisterForEntity(
                typeof(SampleAppDbContext),
                typeof(CustomEntity),
                IocManager,
                EfCoreAutoRepositoryTypes.Default
                );

            genericRepositoryRegistarar.RegisterForEntity(
                typeof(SampleAppDbContext),
                typeof(CustomEntityWithGuidId),
                IocManager,
                EfCoreAutoRepositoryTypes.Default
                );

            Configuration.Modules.AbpAutoMapper().Configurators.Add(configuration =>
            {
                CustomDtoMapper.CreateMappings(configuration, new MultiLingualMapContext(
                                                   IocManager.Resolve <ISettingManager>()
                                                   ));
            });
        }
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(typeof(AbpZeroCoreSampleAppModule).GetAssembly());

            Configuration.Modules.AbpAutoMapper().Configurators.Add(configuration =>
            {
                CustomDtoMapper.CreateMappings(configuration, new MultiLingualMapContext(
                                                   IocManager.Resolve <ISettingManager>()
                                                   ));
            });
        }