diff --git a/src/VirtoCommerce.PricingModule.Core/VirtoCommerce.PricingModule.Core.csproj b/src/VirtoCommerce.PricingModule.Core/VirtoCommerce.PricingModule.Core.csproj
index 85b407df..801dc618 100644
--- a/src/VirtoCommerce.PricingModule.Core/VirtoCommerce.PricingModule.Core.csproj
+++ b/src/VirtoCommerce.PricingModule.Core/VirtoCommerce.PricingModule.Core.csproj
@@ -17,6 +17,6 @@
-
+
\ No newline at end of file
diff --git a/src/VirtoCommerce.PricingModule.Data.MySql/DbContextOptionsBuilderExtensions.cs b/src/VirtoCommerce.PricingModule.Data.MySql/DbContextOptionsBuilderExtensions.cs
deleted file mode 100644
index 085682fc..00000000
--- a/src/VirtoCommerce.PricingModule.Data.MySql/DbContextOptionsBuilderExtensions.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace VirtoCommerce.PricingModule.Data.MySql
-{
- public static class DbContextOptionsBuilderExtensions
- {
- ///
- /// Configures the context to use PostgreSql.
- ///
- public static DbContextOptionsBuilder UseMySqlDatabase(this DbContextOptionsBuilder builder, string connectionString) =>
- builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), db => db
- .MigrationsAssembly(typeof(MySqlDbContextFactory).Assembly.GetName().Name));
- }
-}
diff --git a/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDataAssemblyMarker.cs b/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDataAssemblyMarker.cs
new file mode 100644
index 00000000..5f16d25c
--- /dev/null
+++ b/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDataAssemblyMarker.cs
@@ -0,0 +1,5 @@
+namespace VirtoCommerce.PricingModule.Data.MySql;
+
+public class MySqlDataAssemblyMarker
+{
+}
diff --git a/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDbContextFactory.cs b/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDbContextFactory.cs
index b955db00..e3e55e98 100644
--- a/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDbContextFactory.cs
+++ b/src/VirtoCommerce.PricingModule.Data.MySql/MySqlDbContextFactory.cs
@@ -16,7 +16,7 @@ public PricingDbContext CreateDbContext(string[] args)
connectionString,
ResolveServerVersion(serverVersion, connectionString),
db => db
- .MigrationsAssembly(typeof(MySqlDbContextFactory).Assembly.GetName().Name));
+ .MigrationsAssembly(typeof(MySqlDataAssemblyMarker).Assembly.GetName().Name));
return new PricingDbContext(builder.Options);
}
diff --git a/src/VirtoCommerce.PricingModule.Data.MySql/VirtoCommerce.PricingModule.Data.MySql.csproj b/src/VirtoCommerce.PricingModule.Data.MySql/VirtoCommerce.PricingModule.Data.MySql.csproj
index ad9fe7d7..507aefe8 100644
--- a/src/VirtoCommerce.PricingModule.Data.MySql/VirtoCommerce.PricingModule.Data.MySql.csproj
+++ b/src/VirtoCommerce.PricingModule.Data.MySql/VirtoCommerce.PricingModule.Data.MySql.csproj
@@ -5,11 +5,11 @@
enable
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/src/VirtoCommerce.PricingModule.Data.PostgreSql/DbContextOptionsBuilderExtensions.cs b/src/VirtoCommerce.PricingModule.Data.PostgreSql/DbContextOptionsBuilderExtensions.cs
deleted file mode 100644
index 5e7079cd..00000000
--- a/src/VirtoCommerce.PricingModule.Data.PostgreSql/DbContextOptionsBuilderExtensions.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace VirtoCommerce.PricingModule.Data.PostgreSql
-{
- public static class DbContextOptionsBuilderExtensions
- {
- ///
- /// Configures the context to use PostgreSql.
- ///
- public static DbContextOptionsBuilder UsePostgreSqlDatabase(this DbContextOptionsBuilder builder, string connectionString) =>
- builder.UseNpgsql(connectionString, db => db
- .MigrationsAssembly(typeof(PostgreSqlDbContextFactory).Assembly.GetName().Name));
- }
-}
diff --git a/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDataAssemblyMarker.cs b/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDataAssemblyMarker.cs
new file mode 100644
index 00000000..6362d88b
--- /dev/null
+++ b/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDataAssemblyMarker.cs
@@ -0,0 +1,5 @@
+namespace VirtoCommerce.PricingModule.Data.PostgreSql;
+
+public class PostgreSqlDataAssemblyMarker
+{
+}
diff --git a/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDbContextFactory.cs b/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDbContextFactory.cs
index 883788e9..0b34dff4 100644
--- a/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDbContextFactory.cs
+++ b/src/VirtoCommerce.PricingModule.Data.PostgreSql/PostgreSqlDbContextFactory.cs
@@ -13,7 +13,7 @@ public PricingDbContext CreateDbContext(string[] args)
builder.UseNpgsql(
connectionString,
- db => db.MigrationsAssembly(typeof(PostgreSqlDbContextFactory).Assembly.GetName().Name));
+ db => db.MigrationsAssembly(typeof(PostgreSqlDataAssemblyMarker).Assembly.GetName().Name));
return new PricingDbContext(builder.Options);
}
diff --git a/src/VirtoCommerce.PricingModule.Data.PostgreSql/VirtoCommerce.PricingModule.Data.PostgreSql.csproj b/src/VirtoCommerce.PricingModule.Data.PostgreSql/VirtoCommerce.PricingModule.Data.PostgreSql.csproj
index 0ec3dfc5..acaf816b 100644
--- a/src/VirtoCommerce.PricingModule.Data.PostgreSql/VirtoCommerce.PricingModule.Data.PostgreSql.csproj
+++ b/src/VirtoCommerce.PricingModule.Data.PostgreSql/VirtoCommerce.PricingModule.Data.PostgreSql.csproj
@@ -5,11 +5,11 @@
enable
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/src/VirtoCommerce.PricingModule.Data.SqlServer/DbContextOptionsBuilderExtensions.cs b/src/VirtoCommerce.PricingModule.Data.SqlServer/DbContextOptionsBuilderExtensions.cs
deleted file mode 100644
index 3b6ea1d9..00000000
--- a/src/VirtoCommerce.PricingModule.Data.SqlServer/DbContextOptionsBuilderExtensions.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace VirtoCommerce.PricingModule.Data.SqlServer
-{
- public static class DbContextOptionsBuilderExtensions
- {
- ///
- /// Configures the context to use SqlServer.
- ///
- public static DbContextOptionsBuilder UseSqlServerDatabase(this DbContextOptionsBuilder builder, string connectionString)
- {
- return builder.UseSqlServer(connectionString, db => db
- .MigrationsAssembly(typeof(SqlServerDbContextFactory).Assembly.GetName().Name));
- }
- }
-}
diff --git a/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDataAssemblyMarker.cs b/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDataAssemblyMarker.cs
new file mode 100644
index 00000000..99e4b857
--- /dev/null
+++ b/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDataAssemblyMarker.cs
@@ -0,0 +1,5 @@
+namespace VirtoCommerce.PricingModule.Data.SqlServer;
+
+public class SqlServerDataAssemblyMarker
+{
+}
diff --git a/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDbContextFactory.cs b/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDbContextFactory.cs
index 1bc42bc9..a290d509 100644
--- a/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDbContextFactory.cs
+++ b/src/VirtoCommerce.PricingModule.Data.SqlServer/SqlServerDbContextFactory.cs
@@ -13,7 +13,7 @@ public PricingDbContext CreateDbContext(string[] args)
builder.UseSqlServer(
connectionString,
- db => db.MigrationsAssembly(typeof(SqlServerDbContextFactory).Assembly.GetName().Name));
+ db => db.MigrationsAssembly(typeof(SqlServerDataAssemblyMarker).Assembly.GetName().Name));
return new PricingDbContext(builder.Options);
}
diff --git a/src/VirtoCommerce.PricingModule.Data.SqlServer/VirtoCommerce.PricingModule.Data.SqlServer.csproj b/src/VirtoCommerce.PricingModule.Data.SqlServer/VirtoCommerce.PricingModule.Data.SqlServer.csproj
index fc377040..5714b3ef 100644
--- a/src/VirtoCommerce.PricingModule.Data.SqlServer/VirtoCommerce.PricingModule.Data.SqlServer.csproj
+++ b/src/VirtoCommerce.PricingModule.Data.SqlServer/VirtoCommerce.PricingModule.Data.SqlServer.csproj
@@ -5,11 +5,11 @@
enable
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/src/VirtoCommerce.PricingModule.Data/VirtoCommerce.PricingModule.Data.csproj b/src/VirtoCommerce.PricingModule.Data/VirtoCommerce.PricingModule.Data.csproj
index 813e41e6..c2eb36eb 100644
--- a/src/VirtoCommerce.PricingModule.Data/VirtoCommerce.PricingModule.Data.csproj
+++ b/src/VirtoCommerce.PricingModule.Data/VirtoCommerce.PricingModule.Data.csproj
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/src/VirtoCommerce.PricingModule.Web/Module.cs b/src/VirtoCommerce.PricingModule.Web/Module.cs
index 65ae6702..67028359 100644
--- a/src/VirtoCommerce.PricingModule.Web/Module.cs
+++ b/src/VirtoCommerce.PricingModule.Web/Module.cs
@@ -22,6 +22,9 @@
using VirtoCommerce.Platform.Core.Settings;
using VirtoCommerce.Platform.Core.Settings.Events;
using VirtoCommerce.Platform.Data.Extensions;
+using VirtoCommerce.Platform.Data.MySql.Extensions;
+using VirtoCommerce.Platform.Data.PostgreSql.Extensions;
+using VirtoCommerce.Platform.Data.SqlServer.Extensions;
using VirtoCommerce.Platform.Security.Authorization;
using VirtoCommerce.PricingModule.Core;
using VirtoCommerce.PricingModule.Core.Events;
@@ -61,13 +64,13 @@ public void Initialize(IServiceCollection serviceCollection)
switch (databaseProvider)
{
case "MySql":
- options.UseMySqlDatabase(connectionString);
+ options.UseMySqlDatabase(connectionString, typeof(MySqlDataAssemblyMarker), Configuration);
break;
case "PostgreSql":
- options.UsePostgreSqlDatabase(connectionString);
+ options.UsePostgreSqlDatabase(connectionString, typeof(PostgreSqlDataAssemblyMarker), Configuration);
break;
default:
- options.UseSqlServerDatabase(connectionString);
+ options.UseSqlServerDatabase(connectionString, typeof(SqlServerDataAssemblyMarker), Configuration);
break;
}
});
diff --git a/src/VirtoCommerce.PricingModule.Web/module.manifest b/src/VirtoCommerce.PricingModule.Web/module.manifest
index b8e5f8ef..40112bd3 100644
--- a/src/VirtoCommerce.PricingModule.Web/module.manifest
+++ b/src/VirtoCommerce.PricingModule.Web/module.manifest
@@ -3,7 +3,8 @@
VirtoCommerce.Pricing
3.808.0
- 3.825.0
+
+ 3.851.0
@@ -11,6 +12,7 @@
+
Pricing
Robust pricing management functionality based on price list and dynamic evaluation