diff --git a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj index 3134651..6a4d47f 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/EasyMicroservices.Cores.AspCore.Tests.csproj @@ -9,9 +9,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive @@ -26,7 +26,7 @@ - 7.0.12 + 7.0.13 diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj index 55d43e9..1d4ebf1 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.41 + 0.0.0.42 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet diff --git a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj index 51e0e5c..2b3bab3 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.41 + 0.0.0.42 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet,aspcore,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs index ccf93b0..9bf079a 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs @@ -16,6 +16,7 @@ using System.Linq; using System.Net; using System.Net.Mime; +using System.Text; using System.Text.Json; using System.Threading.Tasks; @@ -109,8 +110,11 @@ public static async Task Build(this IApplicationBuilder app) var dbbuilder = new DatabaseCreator(); using var context = scope.ServiceProvider.GetRequiredService(); dbbuilder.Initialize(context); - using var uow = scope.ServiceProvider.GetRequiredService() as UnitOfWork; - await uow.Initialize(MicroserviceName, config.GetValue(ConfigName), typeof(TContext)).ConfigureAwait(false); + if (WhiteLabelRoute.HasValue() || ConfigName.HasValue()) + { + using var uow = scope.ServiceProvider.GetRequiredService() as UnitOfWork; + await uow.Initialize(MicroserviceName, config.GetValue(ConfigName), typeof(TContext)).ConfigureAwait(false); + } } var build = app.Build(); app.Run(build); @@ -179,7 +183,11 @@ public static async Task Build(this WebApplicationBuil using var context = scope.ServiceProvider.GetRequiredService(); dbbuilder.Initialize(context); using var uow = scope.ServiceProvider.GetRequiredService() as UnitOfWork; - await uow.Initialize(MicroserviceName, WhiteLabelRoute ?? config.GetValue(ConfigName), typeof(TContext)).ConfigureAwait(false); + if (WhiteLabelRoute.HasValue() || ConfigName.HasValue()) + { + var value = WhiteLabelRoute ?? config.GetValue(ConfigName); + await uow.Initialize(MicroserviceName, WhiteLabelRoute ?? config.GetValue(ConfigName), typeof(TContext)).ConfigureAwait(false); + } } return build; } diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj index bd0dcb4..14a75ff 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.41 + 0.0.0.42 core contracts. EasyMicroservices@gmail.com core,cores,base,contract,contracts,dto,dtos diff --git a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj index bfc6b1b..6c51bf1 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.41 + 0.0.0.42 core of database. EasyMicroservices@gmail.com core,cores,base,database diff --git a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj index de20e1c..bd06ce0 100644 --- a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.41 + 0.0.0.42 ef core of database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj index 072b039..cf32eb6 100644 --- a/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Relational.EntityFrameworkCore/EasyMicroservices.Cores.Relational.EntityFrameworkCore.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.41 + 0.0.0.42 ef core of Relational database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore,Relational @@ -21,7 +21,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.Cores.Tests/EasyMicroservices.Cores.Tests.csproj b/src/CSharp/EasyMicroservices.Cores.Tests/EasyMicroservices.Cores.Tests.csproj index 4f96004..27e5bef 100644 --- a/src/CSharp/EasyMicroservices.Cores.Tests/EasyMicroservices.Cores.Tests.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Tests/EasyMicroservices.Cores.Tests.csproj @@ -9,18 +9,18 @@ - + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - +