Skip to content

Commit

Permalink
fix: crud service events
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarmesquita committed Aug 22, 2024
1 parent f89001b commit 7400c5d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 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.9.0</AssemblyVersion>
<FileVersion>1.7.9.0</FileVersion>
<Version>1.7.9.0</Version>
<AssemblyVersion>1.7.10.0</AssemblyVersion>
<FileVersion>1.7.10.0</FileVersion>
<Version>1.7.10.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.9.0</AssemblyVersion>
<FileVersion>1.7.9.0</FileVersion>
<Version>1.7.9.0</Version>
<AssemblyVersion>1.7.10.0</AssemblyVersion>
<FileVersion>1.7.10.0</FileVersion>
<Version>1.7.10.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.9.0</AssemblyVersion>
<FileVersion>1.7.9.0</FileVersion>
<Version>1.7.9.0</Version>
<AssemblyVersion>1.7.10.0</AssemblyVersion>
<FileVersion>1.7.10.0</FileVersion>
<Version>1.7.10.0</Version>
<TargetFrameworks>netstandard2.1;net7.0;net8.0</TargetFrameworks>

<PackageId>eQuantic.Core.Application.Crud</PackageId>
Expand Down
8 changes: 4 additions & 4 deletions src/Application.Crud/Services/CrudServiceBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public virtual async Task<TKey> CreateAsync(CreateRequest<TRequest> request, Can

await Repository.AddAsync(item);
await Repository.UnitOfWork.CommitAsync(cancellationToken);
await OnAfterCreateAsync(item, cancellationToken);
await OnAfterCreateAsync(request, item, cancellationToken);

return item.GetKey();
}
Expand Down Expand Up @@ -93,7 +93,7 @@ public virtual async Task<bool> UpdateAsync(UpdateRequest<TRequest, TKey> reques

await Repository.ModifyAsync(item);
await Repository.UnitOfWork.CommitAsync(cancellationToken);
await OnAfterUpdateAsync(item, cancellationToken);
await OnAfterUpdateAsync(request, item, cancellationToken);

return true;
}
Expand Down Expand Up @@ -163,7 +163,7 @@ protected virtual Task OnBeforeCreateAsync(CreateRequest<TRequest> request, TDat
return Task.CompletedTask;
}

protected virtual Task OnAfterCreateAsync(TDataEntity? dataEntity, CancellationToken cancellationToken = default)
protected virtual Task OnAfterCreateAsync(CreateRequest<TRequest> request, TDataEntity? dataEntity, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
Expand All @@ -173,7 +173,7 @@ protected virtual Task OnBeforeUpdateAsync(UpdateRequest<TRequest, TKey> request
return Task.CompletedTask;
}

protected virtual Task OnAfterUpdateAsync(TDataEntity? dataEntity, CancellationToken cancellationToken = default)
protected virtual Task OnAfterUpdateAsync(UpdateRequest<TRequest, TKey> request, TDataEntity? dataEntity, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}
Expand Down
12 changes: 6 additions & 6 deletions src/eQuantic.Core.Api.Sample/eQuantic.Core.Api.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="eQuantic.Core.Data.EntityFramework.SqlServer" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
<PackageReference Include="eQuantic.Core.Data.EntityFramework.SqlServer" Version="8.0.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.7" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.6.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.7.1" />
</ItemGroup>
</Project>

0 comments on commit 7400c5d

Please sign in to comment.