diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/DesignTimeFactory.cs b/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/DesignTimeFactory.cs index 00e7540..cbe61bf 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/DesignTimeFactory.cs +++ b/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/DesignTimeFactory.cs @@ -8,7 +8,8 @@ public class DesignTimeFactory : IDesignTimeDbContextFactory public PwaDbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder(); - builder.UseSqlServer("Server=(local);Database=DATABASENAME;Trusted_Connection=True;MultipleActiveResultSets=true"); + builder.UseSqlServer("Server=(local);Database=DATABASENAME;Trusted_Connection=True;MultipleActiveResultSets=true", + o => o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)); return new PwaDbContext(builder.Options); } diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/StartupExtensions.cs b/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/StartupExtensions.cs index 285e71b..a316a8d 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/StartupExtensions.cs +++ b/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/StartupExtensions.cs @@ -25,6 +25,8 @@ public static IServiceCollection AddPwaStorageMSSQL( options.UseSqlServer(connectionString, sqlServerOptionsAction: sqlOptions => { + sqlOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + if (maxConnectionRetryCount > 0) { //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/cloudscribe.PwaKit.Storage.EFCore.MSSQL.csproj b/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/cloudscribe.PwaKit.Storage.EFCore.MSSQL.csproj index 0a81d51..5ae1545 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/cloudscribe.PwaKit.Storage.EFCore.MSSQL.csproj +++ b/src/cloudscribe.PwaKit.Storage.EFCore.MSSQL/cloudscribe.PwaKit.Storage.EFCore.MSSQL.csproj @@ -2,7 +2,7 @@ Microsoft SqlServer storage for cloudscribe.PwaKit - 6.0.0 + 6.0.1 net6.0 Joe Audette pwa,serviceworker,cloudscribe diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.MySql/StartupExtensions.cs b/src/cloudscribe.PwaKit.Storage.EFCore.MySql/StartupExtensions.cs index 1a4a58c..992f5f4 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.MySql/StartupExtensions.cs +++ b/src/cloudscribe.PwaKit.Storage.EFCore.MySql/StartupExtensions.cs @@ -19,7 +19,7 @@ public static IServiceCollection AddPwaStorageMySql( { services.AddPwaStorageEFCommon(); - services.AddEntityFrameworkMySql() + services //.AddEntityFrameworkMySql() .AddDbContext(options => options.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), // breaking change in Net5.0 mySqlOptionsAction: sqlOptions => diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.MySql/cloudscribe.PwaKit.Storage.EFCore.MySql.csproj b/src/cloudscribe.PwaKit.Storage.EFCore.MySql/cloudscribe.PwaKit.Storage.EFCore.MySql.csproj index 60a2054..47d4533 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.MySql/cloudscribe.PwaKit.Storage.EFCore.MySql.csproj +++ b/src/cloudscribe.PwaKit.Storage.EFCore.MySql/cloudscribe.PwaKit.Storage.EFCore.MySql.csproj @@ -2,7 +2,7 @@ MySql storage for cloudscribe.PwaKit - 6.0.0 + 6.0.1 net6.0 Joe Audette pwa,serviceworker,cloudscribe diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/DesignTimeFactory.cs b/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/DesignTimeFactory.cs index a09faba..a95280d 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/DesignTimeFactory.cs +++ b/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/DesignTimeFactory.cs @@ -8,7 +8,8 @@ public class DesignTimeFactory : IDesignTimeDbContextFactory public PwaDbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder(); - builder.UseNpgsql("server=yourservername;UID=yourdatabaseusername;PWD=yourdatabaseuserpassword;database=yourdatabasename"); + builder.UseNpgsql("server=yourservername;UID=yourdatabaseusername;PWD=yourdatabaseuserpassword;database=yourdatabasename", + o => o.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)); return new PwaDbContext(builder.Options); } diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/StartupExtensions.cs b/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/StartupExtensions.cs index 9015c23..b5b7303 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/StartupExtensions.cs +++ b/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/StartupExtensions.cs @@ -19,11 +19,13 @@ public static IServiceCollection AddPwaStoragePostgreSql( { services.AddPwaStorageEFCommon(); - services.AddEntityFrameworkNpgsql() + services //.AddEntityFrameworkNpgsql() .AddDbContext(options => options.UseNpgsql(connectionString, npgsqlOptionsAction: sqlOptions => { + sqlOptions.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + if (maxConnectionRetryCount > 0) { //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency diff --git a/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/cloudscribe.PwaKit.Storage.EFCore.PostgreSql.csproj b/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/cloudscribe.PwaKit.Storage.EFCore.PostgreSql.csproj index 80c06b9..14dbeb3 100644 --- a/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/cloudscribe.PwaKit.Storage.EFCore.PostgreSql.csproj +++ b/src/cloudscribe.PwaKit.Storage.EFCore.PostgreSql/cloudscribe.PwaKit.Storage.EFCore.PostgreSql.csproj @@ -2,7 +2,7 @@ PostgreSql storage for cloudscribe.PwaKit - 6.0.3 + 6.0.4 net6.0 Joe Audette pwa,serviceworker,cloudscribe