-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fluent Api Configuration for SqlServer #670
Comments
It's a bug in the condition on the following line: Audit.NET/src/Audit.NET.SqlServer/Providers/SqlDataProvider.cs Lines 174 to 176 in e505b77
It should be: return Schema.GetValue(auditEvent) != null
? ...
: ...; I will be fixing this soon and creating a new version. |
Fixed on version 25.0.5, please upgrade your references and re-test |
I upgraded and re-tested it. It all works! Thank you very much for the fast reaction and implementation. |
Describe the bug
After upgrading from Audit.Net.SqlServer version 24.0.1 to 25.0.x, the fluent API configuration began failing. The issue specifically occurs with the dynamic schema configuration, where the AuditEventWebApi consistently results in being null. I've attempted alternative approaches, such as using SqlDataProvider, but the problem persists—the event is always null. Despite searching for breaking changes between versions 24.x and 25.x, I haven't found any relevant information. It's essential for me to use a dynamic schema since the database contains multiple schemas. Below is my configuration with the fluent API:
In this configuration, the variable s within the schema method is always null.
To Reproduce
Trigger a Web API Action.
Expected Behavior
The AuditEventWebApi variable s should be populated with an AuditApiAction containing all the information about the Web API action.
Libraries
Audit.NET: 25.0.4
Audit.NET.SqlServer: 25.0.4
Audit.WebApi.Core: 25.0.4
Target .NET Framework
.NET 8.0
The text was updated successfully, but these errors were encountered: