Skip to content

Commit 99e3894

Browse files
committed
refactor
1 parent 0aa22b0 commit 99e3894

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

src/providers/WorkflowCore.Persistence.EntityFramework/Services/EntityFrameworkPersistenceProvider.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
namespace WorkflowCore.Persistence.EntityFramework.Services
1616
{
17-
public class EntityFrameworkPersistenceProvider<TContext> : IPersistenceProvider
18-
where TContext : WorkflowDbContext
17+
public class EntityFrameworkPersistenceProvider : IPersistenceProvider
1918
{
2019
private readonly bool _canCreateDB;
2120
private readonly bool _canMigrateDB;

src/providers/WorkflowCore.Persistence.PostgreSQL/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static class ServiceCollectionExtensions
1212
{
1313
public static WorkflowOptions UsePostgreSQL(this WorkflowOptions options, string connectionString, bool canCreateDB, bool canMigrateDB)
1414
{
15-
options.UsePersistence(sp => new EntityFrameworkPersistenceProvider<PostgresContext>(new PostgresContextFactory(connectionString), canCreateDB, canMigrateDB));
15+
options.UsePersistence(sp => new EntityFrameworkPersistenceProvider(new PostgresContextFactory(connectionString), canCreateDB, canMigrateDB));
1616
return options;
1717
}
1818
}

src/providers/WorkflowCore.Persistence.SqlServer/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static class ServiceCollectionExtensions
1010
{
1111
public static WorkflowOptions UseSqlServer(this WorkflowOptions options, string connectionString, bool canCreateDB, bool canMigrateDB)
1212
{
13-
options.UsePersistence(sp => new EntityFrameworkPersistenceProvider<SqlServerContext>(new SqlContextFactory(connectionString), canCreateDB, canMigrateDB));
13+
options.UsePersistence(sp => new EntityFrameworkPersistenceProvider(new SqlContextFactory(connectionString), canCreateDB, canMigrateDB));
1414
return options;
1515
}
1616
}

src/providers/WorkflowCore.Persistence.Sqlite/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static class ServiceCollectionExtensions
1212
{
1313
public static WorkflowOptions UseSqlite(this WorkflowOptions options, string connectionString, bool canCreateDB)
1414
{
15-
options.UsePersistence(sp => new EntityFrameworkPersistenceProvider<SqliteContext>(new SqliteContextFactory(connectionString), canCreateDB, false));
15+
options.UsePersistence(sp => new EntityFrameworkPersistenceProvider(new SqliteContextFactory(connectionString), canCreateDB, false));
1616
return options;
1717
}
1818
}

test/WorkflowCore.Tests.PostgreSQL/PostgresPersistenceProviderFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class PostgresPersistenceProviderFixture : BasePersistenceFixture
1919
public PostgresPersistenceProviderFixture(PostgresDockerSetup dockerSetup, ITestOutputHelper output)
2020
{
2121
output.WriteLine($"Connecting on {PostgresDockerSetup.ConnectionString}");
22-
_subject = new EntityFrameworkPersistenceProvider<PostgresContext>(new PostgresContextFactory(PostgresDockerSetup.ConnectionString), true, true);
22+
_subject = new EntityFrameworkPersistenceProvider(new PostgresContextFactory(PostgresDockerSetup.ConnectionString), true, true);
2323
_subject.EnsureStoreExists();
2424
}
2525
}

test/WorkflowCore.Tests.SqlServer/SqlServerPersistenceProviderFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected override IPersistenceProvider Subject
2020
{
2121
get
2222
{
23-
var db = new EntityFrameworkPersistenceProvider<SqlServerContext>(new SqlContextFactory(_connectionString), true, true);
23+
var db = new EntityFrameworkPersistenceProvider(new SqlContextFactory(_connectionString), true, true);
2424
db.EnsureStoreExists();
2525
return db;
2626
}

test/WorkflowCore.Tests.Sqlite/SqlitePersistenceProviderFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected override IPersistenceProvider Subject
2323
{
2424
get
2525
{
26-
var db = new EntityFrameworkPersistenceProvider<SqliteContext>(new SqliteContextFactory(_connectionString), true, false);
26+
var db = new EntityFrameworkPersistenceProvider(new SqliteContextFactory(_connectionString), true, false);
2727
db.EnsureStoreExists();
2828
return db;
2929
}

0 commit comments

Comments
 (0)