Example #1
0
        public static EntityServicesBuilder AddProviderServices(this EntityServicesBuilder entityServicesBuilder)
        {
            entityServicesBuilder
            .AddRelational().ServiceCollection
            .AddSingleton <ILoggerFactory, RecordingLoggerFactory>()
            .AddSingleton <FakeValueGeneratorCache>()
            .AddSingleton <FakeSqlGenerator>()
            .AddSingleton <SqlStatementExecutor, RecordingSqlStatementExecutor>()
            .AddSingleton <FakeTypeMapper>()
            .AddSingleton <ModificationCommandBatchFactory>()
            .AddSingleton <FakeCommandBatchPreparer>()
            .AddSingleton <FakeRelationalMetadataExtensionProvider>()
            .AddSingleton <FakeMigrationOperationFactory>()
            .AddScoped <BatchExecutor>()
            .AddScoped <DataStoreSource, FakeDataStoreSource>()
            .AddScoped <FakeDataStoreServices>()
            .AddScoped <FakeDataStore>()
            .AddScoped <FakeRelationalConnection>()
            .AddScoped <FakeMigrationOperationProcessor>()
            .AddScoped <FakeModelDiffer>()
            .AddScoped <FakeDatabase>()
            .AddScoped <FakeMigrationOperationSqlGeneratorFactory>()
            .AddScoped <RecordingDataStoreCreator>()
            .AddScoped <MigrationAssembly>()
            .AddScoped <HistoryRepository>()
            .AddScoped <TestMigrator>();

            return(entityServicesBuilder);
        }
Example #2
0
        public static EntityServicesBuilder AddMigrations([NotNull] this EntityServicesBuilder builder)
        {
            Check.NotNull(builder, "builder");

            builder
            .AddRelational().ServiceCollection
            .TryAdd(new ServiceCollection()
                    .AddScoped <MigrationAssembly>()
                    .AddScoped <HistoryRepository>()
                    .AddScoped(MigrationsDataStoreServices.MigratorFactory));

            return(builder);
        }
 public static EntityServicesBuilder AddProviderServices(this EntityServicesBuilder entityServicesBuilder)
 {
     return(entityServicesBuilder.AddRelational());
 }