File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ Below is a simplified example of how your `Program.cs` file might look:
157157``` csharp
158158var 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
161161builder .Services .AddAuditTrail <AuditTrailConsumer >(typeof (Program ).Assembly );
162162
163163// Register DbContext with audit trail interceptors
@@ -169,6 +169,11 @@ var app = builder.Build();
169169app .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
174179The audit trail event data is represented by the following classes:
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments