Skip to content

Commit

Permalink
fix audit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Mar 25, 2024
1 parent a943834 commit 2c152d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/MediatR.CommandQuery.Audit/AuditServiceExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using EntityChange;

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;

Expand All @@ -10,6 +12,9 @@ public static IServiceCollection AddEntityAudit(this IServiceCollection services
if (services is null)
throw new ArgumentNullException(nameof(services));

services.TryAddSingleton<IEntityConfiguration>(sp => new EntityConfiguration(sp.GetServices<IEntityProfile>()));
services.TryAddSingleton<IEntityComparer>(sp => new EntityComparer(sp.GetRequiredService<IEntityConfiguration>()));

services.TryAddSingleton(typeof(IChangeCollector<,>), typeof(ChangeCollector<,>));

return services;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EntityChange" Version="5.1.0" />
<PackageReference Include="EntityChange" Version="5.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
</ItemGroup>

Expand Down

0 comments on commit 2c152d9

Please sign in to comment.