Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null reference bug #165

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading