-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ElsaDbContextOptions * set Schema from elsaDbContextOptions * file rename * add options as arg to DbContextOptionsBuilderExtensions * add options to module extensions in Elsa.EntityFrameworkCore.MySql * add options to module extensions in Elsa.EntityFrameworkCore.PostgreSql * add options to module extensions in Elsa.EntityFrameworkCore.Sqlite * add options to module extensions in Elsa.EntityFrameworkCore.SqlServer * add validations * update doc strings
- Loading branch information
Showing
26 changed files
with
207 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
src/modules/Elsa.EntityFrameworkCore.MySql/Modules/Labels/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
using Elsa.EntityFrameworkCore.Modules.Labels; | ||
using Elsa.EntityFrameworkCore.Common; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Elsa.EntityFrameworkCore.Extensions; | ||
|
||
public static partial class Extensions | ||
{ | ||
public static EFCoreLabelPersistenceFeature UseMySql(this EFCoreLabelPersistenceFeature feature, string connectionString) | ||
public static EFCoreLabelPersistenceFeature UseMySql(this EFCoreLabelPersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaMySql(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaMySql(connectionString, options); | ||
return feature; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
src/modules/Elsa.EntityFrameworkCore.MySql/Modules/Runtime/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
using Elsa.EntityFrameworkCore.Modules.Runtime; | ||
using Elsa.EntityFrameworkCore.Common; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Elsa.EntityFrameworkCore.Extensions; | ||
|
||
public static partial class Extensions | ||
{ | ||
public static EFCoreDefaultWorkflowRuntimePersistenceFeature UseMySql(this EFCoreDefaultWorkflowRuntimePersistenceFeature feature, string connectionString) | ||
public static EFCoreDefaultWorkflowRuntimePersistenceFeature UseMySql(this EFCoreDefaultWorkflowRuntimePersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaMySql(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaMySql(connectionString, options); | ||
return feature; | ||
} | ||
|
||
public static EFCoreExecutionLogRecordPersistenceFeature UseMySql(this EFCoreExecutionLogRecordPersistenceFeature feature, string connectionString) | ||
public static EFCoreExecutionLogRecordPersistenceFeature UseMySql(this EFCoreExecutionLogRecordPersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaMySql(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaMySql(connectionString, options); | ||
return feature; | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/modules/Elsa.EntityFrameworkCore.PostgreSql/Modules/Labels/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
using Elsa.EntityFrameworkCore.Modules.Labels; | ||
using Elsa.EntityFrameworkCore.Common; | ||
using Elsa.EntityFrameworkCore.Modules.Labels; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Elsa.EntityFrameworkCore.Extensions; | ||
|
||
public static partial class Extensions | ||
{ | ||
public static EFCoreLabelPersistenceFeature UsePostgreSql(this EFCoreLabelPersistenceFeature feature, string connectionString) | ||
public static EFCoreLabelPersistenceFeature UsePostgreSql(this EFCoreLabelPersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaPostgreSql(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaPostgreSql(connectionString, options); | ||
return feature; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
src/modules/Elsa.EntityFrameworkCore.PostgreSql/Modules/Runtime/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
using Elsa.EntityFrameworkCore.Modules.Runtime; | ||
using Elsa.EntityFrameworkCore.Common; | ||
using Elsa.EntityFrameworkCore.Modules.Runtime; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Elsa.EntityFrameworkCore.Extensions; | ||
|
||
public static partial class Extensions | ||
{ | ||
public static EFCoreDefaultWorkflowRuntimePersistenceFeature UsePostgreSql(this EFCoreDefaultWorkflowRuntimePersistenceFeature feature, string connectionString) | ||
public static EFCoreDefaultWorkflowRuntimePersistenceFeature UsePostgreSql(this EFCoreDefaultWorkflowRuntimePersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaPostgreSql(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaPostgreSql(connectionString, options); | ||
return feature; | ||
} | ||
|
||
public static EFCoreExecutionLogRecordPersistenceFeature UsePostgreSql(this EFCoreExecutionLogRecordPersistenceFeature feature, string connectionString) | ||
public static EFCoreExecutionLogRecordPersistenceFeature UsePostgreSql(this EFCoreExecutionLogRecordPersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaPostgreSql(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaPostgreSql(connectionString, options); | ||
return feature; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
src/modules/Elsa.EntityFrameworkCore.SqlServer/Modules/Labels/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
using Elsa.EntityFrameworkCore.Modules.Labels; | ||
using Elsa.EntityFrameworkCore.Common; | ||
using Elsa.EntityFrameworkCore.Modules.Labels; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Elsa.EntityFrameworkCore.Extensions; | ||
|
||
public static partial class Extensions | ||
{ | ||
public static EFCoreLabelPersistenceFeature UseSqlServer(this EFCoreLabelPersistenceFeature feature, string connectionString) | ||
public static EFCoreLabelPersistenceFeature UseSqlServer(this EFCoreLabelPersistenceFeature feature, string connectionString, ElsaDbContextOptions? options = default) | ||
{ | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaSqlServer(connectionString); | ||
feature.DbContextOptionsBuilder = (_, db) => db.UseElsaSqlServer(connectionString, options); | ||
return feature; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.