コード例 #1
0
        protected override void Load(ContainerBuilder builder)
        {
            QueryServiceInstaller.ConfigureContainer(builder);

            LogicServiceInstaller.ConfigureContainer(builder);

            // SQlServer
            if (AppSettings.Apply("ConnectionStrings", "SQlServerDB", "Enabled").ToBool())
            {
                RepositoryInstaller.ConfigureContainerForSqlServer(builder);
            }
            // MySqlDB
            if (AppSettings.Apply("ConnectionStrings", "MySqlDB", "Enabled").ToBool())
            {
                RepositoryInstaller.ConfigureContainerForMySql(builder);
            }

            // Sqlite
            if (AppSettings.Apply("ConnectionStrings", "SqliteDB", "Enabled").ToBool())
            {
                RepositoryInstaller.ConfigureContainerForSqllite(builder);
            }

            CommonInstaller.ConfigureContainer(builder);
        }
コード例 #2
0
 internal static Action <IServiceCollection> ConfigureServices()
 {
     return(services =>
     {
         CommonInstaller.ConfigureContainer(services);
         DataInstaller.ConfigureContainer(services);
         RepositoryInstaller.ConfigureContainer(services);
         MapperInstaller.ConfigureContainer(services);
         QueryServiceInstaller.ConfigureContainer(services);
         DomainServiceInstaller.ConfigureContainer(services);
     });
 }