Ejemplo n.º 1
0
 public static void Init(ref Action <IMapperConfigurationExpression> configuration)
 {
     //对象转换
     if (configuration == null)
     {
         configuration = new Action <IMapperConfigurationExpression>(SysModuleObjectMapper.Config);
     }
     else
     {
         configuration += SysModuleObjectMapper.Config;
     }
     //资源仓储配置
     SysModuleRepositoryConfig.Init();
     //对象标识符生成配置
     SysIdentityKeyConfig.Config();
     //领域事件配置
     DomainEventConfig.Init();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化模块配置
 /// </summary>
 /// <param name="autoMapperConfiguration">Automapper configuration</param>
 public static void Init(ref Action <IMapperConfigurationExpression> autoMapperConfiguration)
 {
     //对象转换
     if (autoMapperConfiguration == null)
     {
         autoMapperConfiguration = ObjectMapConfig.Configure;
     }
     else
     {
         autoMapperConfiguration += ObjectMapConfig.Configure;
     }
     //仓储配置
     RepositoryConfig.Init();
     //标识符生成配置
     SysManager.ConfigureIdentityKey();
     //领域事件配置
     DomainEventConfig.Init();
     //数据库配置
     DatabaseConfig.Init();
 }