diff --git a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Fixtures/BaseFixture.cs b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Fixtures/BaseFixture.cs index 6588b9e..7c50ba4 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Fixtures/BaseFixture.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Fixtures/BaseFixture.cs @@ -19,8 +19,8 @@ public static async Task Init(int port, int? whiteLabelPort, A //app.Services.AddTransient((serviceProvider) => new UnitOfWork(serviceProvider)); app.Services.AddTransient(serviceProvider => new MyTestContext(serviceProvider.GetService())); app.Services.AddTransient(); - app.Services.AddSingleton(service => new WhiteLabelManager(service)); - app.Services.AddSingleton((provider) => + app.Services.AddTransient(service => new WhiteLabelManager(service)); + app.Services.AddTransient((provider) => { return new DefaultUniqueIdentityManager(provider.GetService().CurrentWhiteLabel); }); diff --git a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Program.cs b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Program.cs index e726124..34abca2 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Program.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Program.cs @@ -20,8 +20,8 @@ public static async Task Main(string[] args) app.Services.AddScoped((serviceProvider) => new UnitOfWork(serviceProvider).GetLongContractLogic()); app.Services.AddTransient(serviceProvider => new MyTestContext(serviceProvider.GetService())); app.Services.AddScoped(); - app.Services.AddSingleton(service => new WhiteLabelManager(service)); - app.Services.AddSingleton((provider) => + app.Services.AddTransient(service => new WhiteLabelManager(service)); + app.Services.AddTransient((provider) => { return new DefaultUniqueIdentityManager(provider.GetService().CurrentWhiteLabel); }); diff --git a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Startup.cs b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Startup.cs index e579027..d2da504 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Startup.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCore.Tests/Startup.cs @@ -22,8 +22,8 @@ static WebApplicationBuilder CreateBuilder(long port) app.Services.AddTransient((serviceProvider) => new UnitOfWork(serviceProvider)); app.Services.AddTransient(serviceProvider => new MyTestContext(serviceProvider.GetService())); app.Services.AddTransient(); - app.Services.AddSingleton(service => new WhiteLabelManager(service)); - app.Services.AddSingleton((provider) => + app.Services.AddTransient(service => new WhiteLabelManager(service)); + app.Services.AddTransient((provider) => { return new DefaultUniqueIdentityManager(provider.GetService().CurrentWhiteLabel); }); diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj index 791f2c7..cb83a66 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj @@ -4,7 +4,7 @@ netstandard2.1;net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 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 f41b3d7..44a91a7 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj @@ -4,7 +4,7 @@ net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 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 8559edc..5e24fa1 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/StartUpExtensions.cs @@ -77,8 +77,8 @@ public static IServiceCollection Builder(this IServiceCollection servi services.AddHttpContextAccessor(); services.AddScoped(service => new UnitOfWork(service)); services.AddScoped(); - services.AddSingleton(service => new WhiteLabelManager(service)); - services.AddSingleton((provider) => + services.AddTransient(service => new WhiteLabelManager(service)); + services.AddTransient((provider) => { return new DefaultUniqueIdentityManager(provider.GetService().CurrentWhiteLabel); }); diff --git a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj index 7713e19..51a1d53 100644 --- a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 core of database. EasyMicroservices@gmail.com core,cores,base,client,clients diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj index d43e37d..2e46c54 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net45;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 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 5253481..d008ddc 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj +++ b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj @@ -4,7 +4,7 @@ netstandard2.0;netstandard2.1;net45;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 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 44fe2a9..9f87dff 100644 --- a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj +++ b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ netstandard2.1;net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 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 f5ac325..be3e983 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 @@ -4,7 +4,7 @@ netstandard2.1;net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.1.43 + 0.0.1.44 ef core of Relational database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore,Relational diff --git a/src/CSharp/EasyMicroservices.Cores.Tests/Fixtures/ServiceProviderFixture.cs b/src/CSharp/EasyMicroservices.Cores.Tests/Fixtures/ServiceProviderFixture.cs index 6b57dca..13ece8f 100644 --- a/src/CSharp/EasyMicroservices.Cores.Tests/Fixtures/ServiceProviderFixture.cs +++ b/src/CSharp/EasyMicroservices.Cores.Tests/Fixtures/ServiceProviderFixture.cs @@ -30,8 +30,8 @@ public async Task InitializeAsync() serviceCollection.AddTransient(serviceProvider => new MyTestContext(serviceProvider.GetService())); serviceCollection.AddTransient(serviceProvider => new MyTestContext(serviceProvider.GetService())); serviceCollection.AddTransient(); - serviceCollection.AddSingleton(service => new WhiteLabelManager(service)); - serviceCollection.AddSingleton((provider) => + serviceCollection.AddTransient(service => new WhiteLabelManager(service)); + serviceCollection.AddTransient((provider) => { return new DefaultUniqueIdentityManager(provider.GetService().CurrentWhiteLabel); });