diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/EasyMicroservices.Cores.AspCoreApi.csproj index ed3534f..cf203a1 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 @@ net6.0;net7.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.65 + 0.0.0.66 asp core servces. EasyMicroservices@gmail.com core,cores,base,database,services,asp,aspnet diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualReadableQueryServiceController.cs b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualReadableQueryServiceController.cs index 07753b1..a6a3a27 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualReadableQueryServiceController.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualReadableQueryServiceController.cs @@ -23,7 +23,7 @@ namespace EasyMicroservices.Cores.AspCoreApi; [ApiController] [Route("api/[controller]/[action]")] public class MultilingualReadableQueryServiceController : - ControllerBase, IReadableQueryServiceController, UniqueIdentityLanguageRequestContract> + ControllerBase, IReadableQueryServiceController, GetByUniqueIdentityLanguageRequestContract> where TResponseContract : class where TLanguageResponseContract : class where TEntity : class @@ -104,7 +104,7 @@ async Task> ResolveContentAllLanguage /// /// [HttpPost] - public virtual async Task> GetById(IdLanguageRequestContract request, CancellationToken cancellationToken = default) + public virtual async Task> GetById(GetByIdLanguageRequestContract request, CancellationToken cancellationToken = default) { var result = await ContractLogic.GetById(request, OnGetQuery(), cancellationToken); return await ResolveContentLanguage(result, request.LanguageShortName); @@ -117,7 +117,7 @@ public virtual async Task> GetById(IdLanguage /// /// [HttpPost] - public async Task> GetByIdAllLanguage(IdRequestContract request, CancellationToken cancellationToken = default) + public async Task> GetByIdAllLanguage(GetByIdRequestContract request, CancellationToken cancellationToken = default) { var result = await ContractLogic.GetById(request, OnGetQuery(), cancellationToken); return await ResolveContentAllLanguage(result); @@ -130,7 +130,7 @@ public async Task> GetByIdAllLanguage /// /// [HttpPost] - public virtual async Task> GetByUniqueIdentity(UniqueIdentityLanguageRequestContract request, CancellationToken cancellationToken = default) + public virtual async Task> GetByUniqueIdentity(GetByUniqueIdentityLanguageRequestContract request, CancellationToken cancellationToken = default) { var result = await ContractLogic.GetByUniqueIdentity(request, request.Type, OnGetQuery(), cancellationToken); return await ResolveContentLanguage(result, request.LanguageShortName); @@ -143,7 +143,7 @@ public virtual async Task> GetByUniqueIdentit /// /// [HttpPost] - public async Task> GetByUniqueIdentityAllLanguage(UniqueIdentityRequestContract request, CancellationToken cancellationToken = default) + public async Task> GetByUniqueIdentityAllLanguage(GetByUniqueIdentityRequestContract request, CancellationToken cancellationToken = default) { var result = await ContractLogic.GetByUniqueIdentity(request, request.Type, OnGetQuery(), cancellationToken); return await ResolveContentAllLanguage(result); @@ -206,7 +206,7 @@ public async Task> GetAllWithAllLangu /// /// [HttpPost] - public virtual async Task> GetAllByUniqueIdentity(UniqueIdentityLanguageRequestContract request, CancellationToken cancellationToken = default) + public virtual async Task> GetAllByUniqueIdentity(GetByUniqueIdentityLanguageRequestContract request, CancellationToken cancellationToken = default) { var result = await ContractLogic.GetAllByUniqueIdentity(request, request.Type, OnGetAllQuery(), cancellationToken); return await ResolveContentLanguage(result, request.LanguageShortName); @@ -218,7 +218,7 @@ public virtual async Task> GetAllByUnique /// /// [HttpPost] - public async Task> GetAllByUniqueIdentityAllLanguage(UniqueIdentityRequestContract request, CancellationToken cancellationToken = default) + public async Task> GetAllByUniqueIdentityAllLanguage(GetByUniqueIdentityRequestContract request, CancellationToken cancellationToken = default) { var result = await ContractLogic.GetAllByUniqueIdentity(request, request.Type, OnGetAllQuery(), cancellationToken); return await ResolveContentAllLanguage(result); diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualSimpleQueryServiceController.cs b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualSimpleQueryServiceController.cs index e152a46..81a8f8a 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualSimpleQueryServiceController.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/MultilingualSimpleQueryServiceController.cs @@ -80,7 +80,7 @@ async Task> AddToContentLanguage(MessageContract messa if (!messageContract) return messageContract; var contentResolver = UnitOfWork.GetContentResolver(); - var addedItem = await GetById(new Contracts.Requests.Multilingual.IdLanguageRequestContract { Id = messageContract }) + var addedItem = await GetById(new Contracts.Requests.Multilingual.GetByIdLanguageRequestContract { Id = messageContract }) .AsCheckedResult(); foreach (var request in requests) { @@ -97,7 +97,7 @@ async Task> AddToContentLanguage(ListMessageContract { Id = item }) + var addedItem = await GetById(new Contracts.Requests.Multilingual.GetByIdLanguageRequestContract { Id = item }) .AsCheckedResult(); foreach (var request in requests) { diff --git a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/ReadableQueryServiceController.cs b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/ReadableQueryServiceController.cs index 15ff1d9..7ca35a1 100644 --- a/src/CSharp/EasyMicroservices.Cores.AspCoreApi/ReadableQueryServiceController.cs +++ b/src/CSharp/EasyMicroservices.Cores.AspCoreApi/ReadableQueryServiceController.cs @@ -21,7 +21,7 @@ namespace EasyMicroservices.Cores.AspCoreApi [ApiController] [Route("api/[controller]/[action]")] public class ReadableQueryServiceController : - ControllerBase, IReadableQueryServiceController, UniqueIdentityRequestContract> + ControllerBase, IReadableQueryServiceController, GetByUniqueIdentityRequestContract> where TResponseContract : class where TEntity : class where TFilterContract : FilterRequestContract @@ -71,7 +71,7 @@ public ReadableQueryServiceController(IBaseUnitOfWork unitOfWork) /// /// [HttpPost] - public virtual Task> GetById(IdRequestContract request, CancellationToken cancellationToken = default) + public virtual Task> GetById(GetByIdRequestContract request, CancellationToken cancellationToken = default) { return ContractLogic.GetById(request, OnGetQuery(), cancellationToken); } @@ -83,7 +83,7 @@ public virtual Task> GetById(IdRequestContrac /// /// [HttpPost] - public virtual Task> GetByUniqueIdentity(UniqueIdentityRequestContract request, CancellationToken cancellationToken = default) + public virtual Task> GetByUniqueIdentity(GetByUniqueIdentityRequestContract request, CancellationToken cancellationToken = default) { return ContractLogic.GetByUniqueIdentity(request, request.Type, OnGetQuery(), cancellationToken); } @@ -118,7 +118,7 @@ public virtual Task> GetAll(CancellationT /// /// [HttpPost] - public virtual Task> GetAllByUniqueIdentity(UniqueIdentityRequestContract request, CancellationToken cancellationToken = default) + public virtual Task> GetAllByUniqueIdentity(GetByUniqueIdentityRequestContract request, CancellationToken cancellationToken = default) { return ContractLogic.GetAllByUniqueIdentity(request, request.Type, OnGetAllQuery(), cancellationToken); } diff --git a/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj b/src/CSharp/EasyMicroservices.Cores.AspEntityFrameworkCoreApi/EasyMicroservices.Cores.AspEntityFrameworkCoreApi.csproj index 2786b6b..534011d 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.0.65 + 0.0.0.66 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 083250b..cc175ec 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.0.65 + 0.0.0.66 core of database. EasyMicroservices@gmail.com core,cores,base,client,clients diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/IdRequestContract.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/GetByIdRequestContract.cs similarity index 71% rename from src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/IdRequestContract.cs rename to src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/GetByIdRequestContract.cs index a8dabf0..0088db7 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/IdRequestContract.cs +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/GetByIdRequestContract.cs @@ -6,7 +6,7 @@ namespace EasyMicroservices.Cores.Contracts.Requests /// /// /// - public class IdRequestContract : IIdSchema + public class GetByIdRequestContract : IIdSchema { /// /// @@ -16,9 +16,9 @@ public class IdRequestContract : IIdSchema /// /// /// - public static implicit operator IdRequestContract(T id) + public static implicit operator GetByIdRequestContract(T id) { - return new IdRequestContract() + return new GetByIdRequestContract() { Id = id }; diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/UniqueIdentityRequestContract.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/GetByUniqueIdentityRequestContract.cs similarity index 76% rename from src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/UniqueIdentityRequestContract.cs rename to src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/GetByUniqueIdentityRequestContract.cs index 1467a11..8f129f9 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/UniqueIdentityRequestContract.cs +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/GetByUniqueIdentityRequestContract.cs @@ -6,7 +6,7 @@ namespace EasyMicroservices.Cores.Contracts.Requests /// /// /// - public class UniqueIdentityRequestContract : IUniqueIdentitySchema + public class GetByUniqueIdentityRequestContract : IUniqueIdentitySchema { /// /// @@ -21,9 +21,9 @@ public class UniqueIdentityRequestContract : IUniqueIdentitySchema /// /// /// - public static implicit operator UniqueIdentityRequestContract(string uniqueIdentity) + public static implicit operator GetByUniqueIdentityRequestContract(string uniqueIdentity) { - return new UniqueIdentityRequestContract() + return new GetByUniqueIdentityRequestContract() { UniqueIdentity = uniqueIdentity }; diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/IdLanguageRequestContract.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/GetByIdLanguageRequestContract.cs similarity index 60% rename from src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/IdLanguageRequestContract.cs rename to src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/GetByIdLanguageRequestContract.cs index 9c1ee14..42a9868 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/IdLanguageRequestContract.cs +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/GetByIdLanguageRequestContract.cs @@ -3,7 +3,7 @@ /// /// /// -public class IdLanguageRequestContract : IdRequestContract +public class GetByIdLanguageRequestContract : GetByIdRequestContract { /// /// @@ -13,9 +13,9 @@ public class IdLanguageRequestContract : IdRequestContract /// /// /// - public static implicit operator IdLanguageRequestContract(T id) + public static implicit operator GetByIdLanguageRequestContract(T id) { - return new IdLanguageRequestContract() + return new GetByIdLanguageRequestContract() { Id = id }; @@ -25,9 +25,9 @@ public static implicit operator IdLanguageRequestContract(T id) /// /// /// - public static implicit operator IdLanguageRequestContract((T Id, string LanguageShortName) input) + public static implicit operator GetByIdLanguageRequestContract((T Id, string LanguageShortName) input) { - return new IdLanguageRequestContract() + return new GetByIdLanguageRequestContract() { Id = input.Id, LanguageShortName = input.LanguageShortName diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/UniqueIdentityLanguageRequestContract.cs b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/GetByUniqueIdentityLanguageRequestContract.cs similarity index 56% rename from src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/UniqueIdentityLanguageRequestContract.cs rename to src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/GetByUniqueIdentityLanguageRequestContract.cs index d2338c5..cb74017 100644 --- a/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/UniqueIdentityLanguageRequestContract.cs +++ b/src/CSharp/EasyMicroservices.Cores.Contracts/Contracts/Requests/Multilingual/GetByUniqueIdentityLanguageRequestContract.cs @@ -2,7 +2,7 @@ /// /// /// -public class UniqueIdentityLanguageRequestContract : UniqueIdentityRequestContract +public class GetByUniqueIdentityLanguageRequestContract : GetByUniqueIdentityRequestContract { /// /// @@ -13,9 +13,9 @@ public class UniqueIdentityLanguageRequestContract : UniqueIdentityRequestContra /// /// /// - public static implicit operator UniqueIdentityLanguageRequestContract(string uniqueIdentity) + public static implicit operator GetByUniqueIdentityLanguageRequestContract(string uniqueIdentity) { - return new UniqueIdentityLanguageRequestContract() + return new GetByUniqueIdentityLanguageRequestContract() { UniqueIdentity = uniqueIdentity }; @@ -25,9 +25,9 @@ public static implicit operator UniqueIdentityLanguageRequestContract(string uni /// /// /// - public static implicit operator UniqueIdentityLanguageRequestContract((string UniqueIdentity, string LanguageShortName) input) + public static implicit operator GetByUniqueIdentityLanguageRequestContract((string UniqueIdentity, string LanguageShortName) input) { - return new UniqueIdentityLanguageRequestContract() + return new GetByUniqueIdentityLanguageRequestContract() { UniqueIdentity = input.UniqueIdentity, LanguageShortName = input.LanguageShortName diff --git a/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj b/src/CSharp/EasyMicroservices.Cores.Contracts/EasyMicroservices.Cores.Contracts.csproj index 4f96b19..57e52d6 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.0.65 + 0.0.0.66 core contracts. EasyMicroservices@gmail.com core,cores,base,contract,contracts,dto,dtos diff --git a/src/CSharp/EasyMicroservices.Cores.Database/Database/Interfaces/IReadableLogic.cs b/src/CSharp/EasyMicroservices.Cores.Database/Database/Interfaces/IReadableLogic.cs index 9efb84a..b59f1ab 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/Database/Interfaces/IReadableLogic.cs +++ b/src/CSharp/EasyMicroservices.Cores.Database/Database/Interfaces/IReadableLogic.cs @@ -24,7 +24,7 @@ public interface IReadableLogic /// /// /// - Task> GetById(IdRequestContract idRequest, CancellationToken cancellationToken = default); + Task> GetById(GetByIdRequestContract idRequest, CancellationToken cancellationToken = default); /// /// /// @@ -64,7 +64,7 @@ public interface IContractReadableLogic : IReadableLogi /// /// /// - Task> GetById(IdRequestContract idRequest, Func, IQueryable> query = default, CancellationToken cancellationToken = default); + Task> GetById(GetByIdRequestContract idRequest, Func, IQueryable> query = default, CancellationToken cancellationToken = default); /// /// /// diff --git a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicBase.cs b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicBase.cs index e0a604e..ada8fac 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicBase.cs +++ b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicBase.cs @@ -61,7 +61,7 @@ public DatabaseLogicBase(IEasyReadableQueryableAsync easyReadableQuerya /// /// /// - public async Task> GetById(IdRequestContract idRequest, CancellationToken cancellationToken = default) + public async Task> GetById(GetByIdRequestContract idRequest, CancellationToken cancellationToken = default) { return await GetById(_easyReadableQueryable, idRequest, null, cancellationToken); } @@ -73,7 +73,7 @@ public async Task> GetById(IdRequestContract idReq /// /// /// - public async Task> GetById(IdRequestContract idRequest, Func, IQueryable> query = default, CancellationToken cancellationToken = default) + public async Task> GetById(GetByIdRequestContract idRequest, Func, IQueryable> query = default, CancellationToken cancellationToken = default) { Func, IEasyReadableQueryableAsync> func = null; if (query != null) diff --git a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicInfrastructure.cs b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicInfrastructure.cs index 6531863..ff91d19 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicInfrastructure.cs +++ b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseLogicInfrastructure.cs @@ -103,7 +103,7 @@ private async Task> UniqueIdentityQueryMake /// /// /// - protected async Task> GetById(IEasyReadableQueryableAsync easyReadableQueryable, IdRequestContract idRequest, Func, IEasyReadableQueryableAsync> query = default, CancellationToken cancellationToken = default) + protected async Task> GetById(IEasyReadableQueryableAsync easyReadableQueryable, GetByIdRequestContract idRequest, Func, IEasyReadableQueryableAsync> query = default, CancellationToken cancellationToken = default) where TEntity : class { IEasyReadableQueryableAsync queryable = easyReadableQueryable; @@ -230,7 +230,7 @@ public async Task> GetBy(IEasyRea /// /// /// - protected async Task> GetById(IEasyReadableQueryableAsync easyReadableQueryable, IdRequestContract idRequest, Func, IEasyReadableQueryableAsync> query = default, CancellationToken cancellationToken = default) + protected async Task> GetById(IEasyReadableQueryableAsync easyReadableQueryable, GetByIdRequestContract idRequest, Func, IEasyReadableQueryableAsync> query = default, CancellationToken cancellationToken = default) where TEntity : class where TContract : class { diff --git a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseMappedLogicBase.cs b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseMappedLogicBase.cs index d756339..ef4ea95 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseMappedLogicBase.cs +++ b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/DatabaseMappedLogicBase.cs @@ -76,7 +76,7 @@ public async Task> GetAll(CancellationTok /// /// /// - public virtual Task> GetById(IdRequestContract contract, Func, IQueryable> query = default, CancellationToken cancellationToken = default) + public virtual Task> GetById(GetByIdRequestContract contract, Func, IQueryable> query = default, CancellationToken cancellationToken = default) { throw new Exception("GetById is not supported in DatabaseMappedLogicBase, you can use IdSchemaDatabaseMappedLogicBase or override this GetById method"); } @@ -190,7 +190,7 @@ public async Task> GetAll(Func /// /// - public Task> GetById(IdRequestContract contract, CancellationToken cancellationToken = default) + public Task> GetById(GetByIdRequestContract contract, CancellationToken cancellationToken = default) { throw new Exception("GetById is not supported in DatabaseMappedLogicBase, you can use IdSchemaDatabaseMappedLogicBase or override this GetById method"); } diff --git a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/IdSchemaDatabaseMappedLogicBase.cs b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/IdSchemaDatabaseMappedLogicBase.cs index baddd71..85d350d 100644 --- a/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/IdSchemaDatabaseMappedLogicBase.cs +++ b/src/CSharp/EasyMicroservices.Cores.Database/Database/Logics/IdSchemaDatabaseMappedLogicBase.cs @@ -77,7 +77,7 @@ public async Task> GetAll(CancellationTok /// /// /// - public async Task> GetById(IdRequestContract idRequest, Func, IQueryable> query = default, CancellationToken cancellationToken = default) + public async Task> GetById(GetByIdRequestContract idRequest, Func, IQueryable> query = default, CancellationToken cancellationToken = default) { Func, IEasyReadableQueryableAsync> func = UpdateFunctionQuery(query); return await GetById(_easyReadableQueryable, idRequest, func, cancellationToken); @@ -195,7 +195,7 @@ public Task> Filter(FilterRequestContract /// /// /// - public Task> GetById(IdRequestContract idRequest, CancellationToken cancellationToken = default) + public Task> GetById(GetByIdRequestContract idRequest, CancellationToken cancellationToken = default) { return GetById(_easyReadableQueryable, idRequest, null, cancellationToken); } diff --git a/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj b/src/CSharp/EasyMicroservices.Cores.Database/EasyMicroservices.Cores.Database.csproj index dbfc2ac..5902c00 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.0.65 + 0.0.0.66 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 9665918..0d351b0 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 @@ net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.65 + 0.0.0.66 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 254aefc..b96bef7 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 @@ net6.0;net8.0 AnyCPU;x64;x86 EasyMicroservices - 0.0.0.65 + 0.0.0.66 ef core of Relational database. EasyMicroservices@gmail.com core,cores,base,database,ef,efcore,Relational diff --git a/src/CSharp/EasyMicroservices.Cores.Tests/DatabaseLogics/LongIdMappedDatabaseLogicBaseTest.cs b/src/CSharp/EasyMicroservices.Cores.Tests/DatabaseLogics/LongIdMappedDatabaseLogicBaseTest.cs index bd95403..5c49339 100644 --- a/src/CSharp/EasyMicroservices.Cores.Tests/DatabaseLogics/LongIdMappedDatabaseLogicBaseTest.cs +++ b/src/CSharp/EasyMicroservices.Cores.Tests/DatabaseLogics/LongIdMappedDatabaseLogicBaseTest.cs @@ -113,7 +113,7 @@ public async Task AddAsync(string userName) var user = await logic.Add(addUser); Assert.True(user.IsSuccess); Assert.True(user.Result > 0); - var foundUser = await logic.GetById(new IdRequestContract() + var foundUser = await logic.GetById(new GetByIdRequestContract() { Id = user.Result }); @@ -253,7 +253,7 @@ public async Task UpdateAsync(string userName, string toUserName) Assert.Equal(updateResult.Result.CreationDateTime, added.CreationDateTime); Assert.True(updateResult.Result.CreationDateTime > DateTime.Now.AddMinutes(-5)); Assert.True(updateResult.Result.ModificationDateTime > DateTime.Now.AddMinutes(-5)); - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -283,7 +283,7 @@ public async Task UpdateChangedValuesOnlyAsync(string userName) Assert.Equal(updateResult.Result.CreationDateTime, added.CreationDateTime); Assert.True(updateResult.Result.CreationDateTime > DateTime.Now.AddMinutes(-5)); Assert.True(updateResult.Result.ModificationDateTime > DateTime.Now.AddMinutes(-5)); - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -389,14 +389,14 @@ public async Task UniqueIdentityAsync(string userName) { await using var logic = GetContractLogic(); var added = await AddAsync(userName); - var found = await logic.GetByUniqueIdentity(new UniqueIdentityRequestContract() + var found = await logic.GetByUniqueIdentity(new GetByUniqueIdentityRequestContract() { UniqueIdentity = added.UniqueIdentity }); Assert.Equal(found.Result.UserName, userName); CheckUniqueIdentity(found.Result.UniqueIdentity); - var foundAll = await logic.GetAllByUniqueIdentity(new UniqueIdentityRequestContract() + var foundAll = await logic.GetAllByUniqueIdentity(new GetByUniqueIdentityRequestContract() { UniqueIdentity = DefaultUniqueIdentityManager.CutUniqueIdentityFromEnd(added.UniqueIdentity, 2) }); @@ -407,7 +407,7 @@ public async Task UniqueIdentityAsync(string userName) var addedProfile = await AddProfileAsync(added.Id, $"Ali{i}"); } await using var profileLogic = GetProfileContractLogic(); - var foundAllProfiles = await profileLogic.GetAllByUniqueIdentity(new UniqueIdentityRequestContract() + var foundAllProfiles = await profileLogic.GetAllByUniqueIdentity(new GetByUniqueIdentityRequestContract() { UniqueIdentity = added.UniqueIdentity }); @@ -415,7 +415,7 @@ public async Task UniqueIdentityAsync(string userName) Assert.Contains(foundAllProfiles.Result, x => x.FirstName.StartsWith("Ali")); Assert.Equal(foundAllProfiles.Result.Count, 10); - var onlyUniqueIdentity = await profileLogic.GetByUniqueIdentity(new UniqueIdentityRequestContract() + var onlyUniqueIdentity = await profileLogic.GetByUniqueIdentity(new GetByUniqueIdentityRequestContract() { UniqueIdentity = added.UniqueIdentity }, default, q => q.Where(x => x.FirstName == "Ali5")); @@ -432,7 +432,7 @@ public async Task HardDeleteAsync(string userName) { await using var logic = GetContractLogic(); var added = await AddAsync(userName); - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -442,7 +442,7 @@ public async Task HardDeleteAsync(string userName) Id = found.Result.Id }); Assert.True(deleted); - found = await logic.GetById(new IdRequestContract() + found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -458,7 +458,7 @@ public async Task HardDeleteBulkAsync(string name, string[] userNames) foreach (var item in userNames) { UserEntity added = await AddAsync(item); - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -472,7 +472,7 @@ public async Task HardDeleteBulkAsync(string name, string[] userNames) Assert.True(deleted); foreach (var item in ids) { - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = item }); @@ -487,7 +487,7 @@ public async Task SoftDeleteAsync(string userName) { await using var logic = GetContractLogic(); var added = await AddAsync(userName); - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -498,7 +498,7 @@ public async Task SoftDeleteAsync(string userName) IsDelete = true }); Assert.True(deleted); - found = await logic.GetById(new IdRequestContract() + found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -560,7 +560,7 @@ public async Task SoftDeleteBulkByIdsAsync(string name, string[] userNames) foreach (var userName in userNames) { var added = await AddAsync(userName); - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = added.Id }); @@ -576,7 +576,7 @@ public async Task SoftDeleteBulkByIdsAsync(string name, string[] userNames) Assert.True(deleted); foreach (var item in ids) { - var found = await logic.GetById(new IdRequestContract() + var found = await logic.GetById(new GetByIdRequestContract() { Id = item }); @@ -598,7 +598,7 @@ public async Task SelfChildTestAsync(string parentName, string[] chilren) var user = await logic.Add(addUser); Assert.True(user.IsSuccess); Assert.True(user.Result > 0); - var foundUser = await logic.GetById(new IdRequestContract() + var foundUser = await logic.GetById(new GetByIdRequestContract() { Id = user.Result }); @@ -647,7 +647,7 @@ public async Task ChildTestAsync(string parentName, string[] chilren) var user = await logic.Add(addUser); Assert.True(user.IsSuccess); Assert.True(user.Result > 0); - var foundUser = await logic.GetById(new IdRequestContract() + var foundUser = await logic.GetById(new GetByIdRequestContract() { Id = user.Result });