Skip to content

Commit

Permalink
Merge pull request #165 from Ali-YousefiTelori/develop
Browse files Browse the repository at this point in the history
Fix null reference bug
  • Loading branch information
Ali-YousefiTelori authored Feb 15, 2024
2 parents 8d73d52 + b7c578b commit 5b70fa9
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>asp core servces.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,database,services,asp,aspnet</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public MultilingualReadableQueryServiceController(IBaseUnitOfWork unitOfWork, IC
public MultilingualReadableQueryServiceController(IBaseUnitOfWork unitOfWork)
{
ContractLogic = unitOfWork.GetReadableContractLogic<TEntity, TResponseContract, TId>();
UnitOfWork = unitOfWork;
}

async Task<MessageContract<T>> ResolveContentLanguage<T>(MessageContract<T> result, string languageShortName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public ReadableQueryServiceController(IBaseUnitOfWork unitOfWork, IContractReada
public ReadableQueryServiceController(IBaseUnitOfWork unitOfWork)
{
ContractLogic = unitOfWork.GetReadableContractLogic<TEntity, TResponseContract, TId>();
UnitOfWork = unitOfWork;
}

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>asp core servces.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,database,services,asp,aspnet,aspcore,efcore</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>core of database.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,client,clients</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net45;net6.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>core contracts.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,contract,contracts,dto,dtos</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public async Task AddProcess(IDatabaseWidgetManager databaseWidgetManager, IBase
DoStopReporting = true
});
DatabaseExtensions.SetIdToRecordId(logic.GetReadableContext(), entity, reportEntity);
if (reportEntity is IUniqueIdentitySchema reportUniqueIdentity && entity is IUniqueIdentitySchema entityUniqueIdentity)
reportUniqueIdentity.UniqueIdentity = entityUniqueIdentity.UniqueIdentity;
await logic
.Add(reportEntity, cancellationToken)
.AsCheckedResult();
Expand All @@ -93,6 +95,13 @@ public async Task AddBulkProcess(IDatabaseWidgetManager databaseWidgetManager, I
DoStopReporting = true
});
DatabaseExtensions.SetIdToRecordId(logic.GetReadableContext(), reportEntities);
foreach (var item in reportEntities)
{
DatabaseExtensions.SetIdToRecordId(logic.GetReadableContext(), item.Key, item.Value);
if (item.Key is IUniqueIdentitySchema reportUniqueIdentity && item.Value is IUniqueIdentitySchema entityUniqueIdentity)
reportUniqueIdentity.UniqueIdentity = entityUniqueIdentity.UniqueIdentity;
}

await logic
.AddBulk(reportEntities.Values.ToList(), cancellationToken)
.AsCheckedResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net45;net6.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>core of database.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,database</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.1;net6.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>ef core of database.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,database,ef,efcore</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.0;netstandard2.1;net45;net6.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>core of infrastructure.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,infrastructure</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<Version>0.0.1.54</Version>
<Version>0.0.1.55</Version>
<Description>ef core of Relational database.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>core,cores,base,database,ef,efcore,Relational</PackageTags>
Expand Down

0 comments on commit 5b70fa9

Please sign in to comment.