Skip to content

Commit

Permalink
fix: entity tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
equantictech committed Aug 2, 2024
1 parent c7a315a commit f89001b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/Api.Crud.Client/Api.Crud.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<RootNamespace>eQuantic.Core.Api.Crud.Client</RootNamespace>
<AssemblyName>eQuantic.Core.Api.Crud.Client</AssemblyName>
<AssemblyTitle>eQuantic.Core.Api.Crud.Client</AssemblyTitle>
<AssemblyVersion>1.7.8.0</AssemblyVersion>
<FileVersion>1.7.8.0</FileVersion>
<Version>1.7.8.0</Version>
<AssemblyVersion>1.7.9.0</AssemblyVersion>
<FileVersion>1.7.9.0</FileVersion>
<Version>1.7.9.0</Version>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>

<PackageId>eQuantic.Core.Api.Crud.Client</PackageId>
Expand Down
6 changes: 3 additions & 3 deletions src/Api.Crud/Api.Crud.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<AssemblyName>eQuantic.Core.Api.Crud</AssemblyName>
<RootNamespace>eQuantic.Core.Api.Crud</RootNamespace>
<AssemblyTitle>eQuantic.Core.Api.Crud</AssemblyTitle>
<AssemblyVersion>1.7.8.0</AssemblyVersion>
<FileVersion>1.7.8.0</FileVersion>
<Version>1.7.8.0</Version>
<AssemblyVersion>1.7.9.0</AssemblyVersion>
<FileVersion>1.7.9.0</FileVersion>
<Version>1.7.9.0</Version>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>

<PackageId>eQuantic.Core.Api.Crud</PackageId>
Expand Down
6 changes: 3 additions & 3 deletions src/Application.Crud/Application.Crud.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<RootNamespace>eQuantic.Core.Application.Crud</RootNamespace>
<AssemblyName>eQuantic.Core.Application.Crud</AssemblyName>
<AssemblyTitle>eQuantic.Core.Application.Crud</AssemblyTitle>
<AssemblyVersion>1.7.8.0</AssemblyVersion>
<FileVersion>1.7.8.0</FileVersion>
<Version>1.7.8.0</Version>
<AssemblyVersion>1.7.9.0</AssemblyVersion>
<FileVersion>1.7.9.0</FileVersion>
<Version>1.7.9.0</Version>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>

<PackageId>eQuantic.Core.Application.Crud</PackageId>
Expand Down
6 changes: 3 additions & 3 deletions src/Application.Crud/Services/CrudServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public virtual async Task<TKey> CreateAsync(CreateRequest<TRequest> request, Can
itemWithTimeMark.CreatedAt = DateTime.UtcNow;
}

if (item is IEntityOwned<TUser, TUserKey> itemWithOwner)
if (item is IEntityOwned<TUserKey> itemWithOwner)
{
var userId = await ApplicationContext.GetCurrentUserIdAsync();
itemWithOwner.CreatedById = userId;
Expand Down Expand Up @@ -85,7 +85,7 @@ public virtual async Task<bool> UpdateAsync(UpdateRequest<TRequest, TKey> reques
itemWithTimeTrack.UpdatedAt = DateTime.UtcNow;
}

if (item is IEntityTrack<TUser, TUserKey> itemWithTrack)
if (item is IEntityTrack<TUserKey> itemWithTrack)
{
var userId = await ApplicationContext.GetCurrentUserIdAsync();
itemWithTrack.UpdatedById = userId;
Expand Down Expand Up @@ -119,7 +119,7 @@ public virtual async Task<bool> DeleteAsync(ItemRequest<TKey> request, Cancellat
itemWithTimeEnded.DeletedAt = DateTime.UtcNow;
}

if (item is IEntityHistory<TUser, TUserKey> itemWithHistory)
if (item is IEntityHistory<TUserKey> itemWithHistory)
{
softDelete = true;
var userId = await ApplicationContext.GetCurrentUserIdAsync();
Expand Down

0 comments on commit f89001b

Please sign in to comment.