Skip to content

Commit 23c3d14

Browse files
authored
Merge pull request #4 from PandaTechAM/development
doc update
2 parents c61c174 + d44abc2 commit 23c3d14

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Readme.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Below is a simplified example of how your `Program.cs` file might look:
157157
```csharp
158158
var builder = WebApplication.CreateBuilder(args);
159159

160-
// Register audit trail configurations with the consumer class
160+
// Register audit trail configurations with the consumer class before adding the DbContext
161161
builder.Services.AddAuditTrail<AuditTrailConsumer>(typeof(Program).Assembly);
162162

163163
// Register DbContext with audit trail interceptors
@@ -169,6 +169,11 @@ var app = builder.Build();
169169
app.Run();
170170
```
171171

172+
> **Note:** The `AddAuditTrail` method registers the audit trail configurations and `HttpContextAccessor` so it should
173+
> be always **before** the `AddDbContext` method. In case of using `AddDbContext` before registration make sure to
174+
> register the `HttpContextAccessor` manually by using `builder.Services.AddHttpContextAccessor()` method in
175+
`Program.cs`.
176+
172177
### 6. Audit Trail Event Data
173178

174179
The audit trail event data is represented by the following classes:

src/EFCore.Audit/EFCore.Audit.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<PackageReadmeFile>Readme.md</PackageReadmeFile>
99
<Authors>Pandatech</Authors>
1010
<Copyright>MIT</Copyright>
11-
<Version>1.1.2</Version>
11+
<Version>1.1.3</Version>
1212
<PackageId>Pandatech.EFCore.Audit</PackageId>
1313
<Title>Pandatech.EFCore.Audit</Title>
1414
<PackageTags>Pandatech;library;EFCore;Audit;DbContext;ChangeTracker;audit-trail</PackageTags>
1515
<Description>Pandatech.EFCore.Audit is a powerful and configurable library designed to collect audit trail data from the EF Core DbContext change tracker. It is built with scalability and professional-grade extensibility in mind.</Description>
1616
<RepositoryUrl>https://github.com/PandaTechAM/be-lib-efcore-audit</RepositoryUrl>
17-
<PackageReleaseNotes>Performance update</PackageReleaseNotes>
17+
<PackageReleaseNotes>Doc update</PackageReleaseNotes>
1818
</PropertyGroup>
1919

2020
<ItemGroup>

0 commit comments

Comments
 (0)