From 90cb5d945d4c4fa7c5d758d4033f8f63199fa4f3 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Sat, 3 Feb 2024 09:42:50 +0330 Subject: [PATCH] Fix default value of LogicOptions --- .../EasyMicroservices.Cores.AspCoreApi.csproj | 2 +- ...ces.Cores.AspEntityFrameworkCoreApi.csproj | 2 +- .../EasyMicroservices.Cores.Clients.csproj | 2 +- .../EasyMicroservices.Cores.Contracts.csproj | 2 +- .../Models/LogicOptions.cs | 19 +++++++++++++++++-- .../EasyMicroservices.Cores.Database.csproj | 2 +- .../Interfaces/IBaseUnitOfWork.cs | 5 +++++ ...oservices.Cores.EntityFrameworkCore.csproj | 2 +- ...ores.Relational.EntityFrameworkCore.csproj | 2 +- 9 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj index 073421d..e83ae77 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.48 + 0.0.1.49 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 2f7d62c..a18ec9c 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.48 + 0.0.1.49 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet,aspcore,efcore diff --git a/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj b/src/CSharp/EasyMicroservices.Cores.Clients/EasyMicroservices.Cores.Clients.csproj index 1466466..5361490 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.48 + 0.0.1.49 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 6559563..14ed6be 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.48 + 0.0.1.49 core contracts. EasyMicroservices@gmail.com core,cores,base,contract,contracts,dto,dtos diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Models/LogicOptions.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Models/LogicOptions.cs index c536daa..84693d7 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/Models/LogicOptions.cs +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Models/LogicOptions.cs @@ -1,5 +1,4 @@ using EasyMicroservices.Cores.DataTypes; -using System; namespace EasyMicroservices.Cores.Models; /// @@ -17,7 +16,23 @@ public LogicOptions() /// /// /// - public UniqueIdentityStrategy UniqueIdentityStrategy { get; set; } = UniqueIdentityStrategy.Default; + UniqueIdentityStrategy _UniqueIdentityStrategy = UniqueIdentityStrategy.Default; + /// + /// + /// + public UniqueIdentityStrategy UniqueIdentityStrategy + { + get + { + if (_UniqueIdentityStrategy == UniqueIdentityStrategy.None) + _UniqueIdentityStrategy = UniqueIdentityStrategy.Default; + return _UniqueIdentityStrategy; + } + set + { + _UniqueIdentityStrategy = value; + } + } /// /// /// diff --git a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj index faeff81..aee98c5 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.48 + 0.0.1.49 core of database. EasyMicroservices@gmail.com core,cores,base,database diff --git a/src/CSharp/EasyMicroservices.Cores.Database/Interfaces/IBaseUnitOfWork.cs b/src/CSharp/EasyMicroservices.Cores.Database/Interfaces/IBaseUnitOfWork.cs index d2d68c4..cd97c4e 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/Interfaces/IBaseUnitOfWork.cs +++ b/src/CSharp/EasyMicroservices.Cores.Database/Interfaces/IBaseUnitOfWork.cs @@ -23,6 +23,11 @@ public interface IBaseUnitOfWork : IDisposable /// /// ServiceAddressInfo GetServiceAddress(string name); + /// + /// + /// + /// + void SetDefaultLogicOptions(LogicOptions logicOptions); /// /// diff --git a/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj b/src/CSharp/EasyMicroservices.Cores.EntityFrameworkCore/EasyMicroservices.Cores.EntityFrameworkCore.csproj index 52f1a91..629fd6c 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.48 + 0.0.1.49 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 0656312..9c6b3e3 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.48 + 0.0.1.49 ef core of Relational database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore,Relational