![]() |
VOOZH | about |
dotnet add package Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer --version 1.0.19
NuGet\Install-Package Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer -Version 1.0.19
<PackageReference Include="Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer" Version="1.0.19" />
<PackageVersion Include="Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer" Version="1.0.19" />Directory.Packages.props
<PackageReference Include="Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer" />Project file
paket add Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer --version 1.0.19
#r "nuget: Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer, 1.0.19"
#:package Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer@1.0.19
#addin nuget:?package=Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer&version=1.0.19Install as a Cake Addin
#tool nuget:?package=Indrivo.Audit.ResourceAccessor.Infrastructure.Data.SqlServer&version=1.0.19Install as a Cake Tool
The audit component will allow you to provide information about user actions in the system. The audit component will provide information on user access to the system, authentication attempts, accessed folders, data changes, etc.
The module is designed to monitor all changes and logs within the system. Depending on the role, access will only be allowed on certain system components. The system will record detailed logs so that access can be monitored, and situations where someone accesses data they should not be able to access can be examined.
A reference web api is already set up in the current repository you can check that one for detailed implementation information. Below only a small set of nuances will be explained. Set up is pretty straightforward you will need to install the following packages inside your solution:
<PackageReference Include="Indrivo.Audit.Accessor" Version="1.0.1" />
In your appsettings.json file, add the configuration for the connection string:
"ConnectionStrings": {
"AuditConnection": "Data Source=(localdb)\\mssqllocaldb;Database=aspnet-auditTest;Trusted_Connection=True;MultipleActiveResultSets=true"
}
The AuditResourceAccessorBuilder is designed to be flexible and allow configuration for different database providers:
SQL Server:
var auditResourceAccessorBuilder = new AuditResourceAccessorBuilder(builder.Services);
auditResourceAccessorBuilder.WithSqlServer(
builder.Configuration["ConnectionStrings:SqlServerConnection"])
.AddServiceLayer()
.AddValidators()
.Build();
PostgreSQL:
var auditResourceAccessorBuilder = new AuditResourceAccessorBuilder(builder.Services);
auditResourceAccessorBuilder.WithPostgreSql(
builder.Configuration["ConnectionStrings:PostgreSqlConnection"])
.AddServiceLayer()
.AddValidators()
.Build();
You can also create custom configurations by implementing the IDbConfigurer interface for any other database provider and integrating it similarly using the builder pattern.
To apply the migrations at the start of the application, you can run the following line of code in your Program.cs:
app.ApplyAuditMigrations();
This nuget exposes 4 methods for creating and geting the audit information:
Task<Result> CreateAuditEventAsync(CreateAuditEventCommand command, CancellationToken cancellationToken);
Task<Result> CreateAuditEventTypeAsync(CreateAuditEventTypeCommand command, CancellationToken cancellationToken);
Task<Result> CreateAuditEventTypesAsync(List<CreateAuditEventTypeCommand> command, CancellationToken cancellationToken);
Task<Result<List<EventTypeDTO>>> GetEventTypesAsync(CancellationToken cancellationToken);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.19 | 166 | 3/31/2026 |
| 1.0.18 | 205 | 12/26/2024 |
| 1.0.17 | 209 | 7/23/2024 |
| 1.0.16 | 188 | 7/23/2024 |
| 1.0.15 | 192 | 7/23/2024 |
| 1.0.14 | 185 | 7/23/2024 |
| 1.0.13 | 208 | 7/23/2024 |
| 1.0.12 | 204 | 7/22/2024 |
| 1.0.11 | 194 | 7/12/2024 |
| 1.0.10 | 203 | 7/12/2024 |
| 1.0.9 | 210 | 7/11/2024 |
| 1.0.8 | 220 | 7/11/2024 |
| 1.0.7 | 208 | 6/10/2024 |
| 1.0.6 | 212 | 5/16/2024 |
| 1.0.5 | 208 | 5/16/2024 |
| 1.0.4 | 226 | 5/15/2024 |
| 1.0.3 | 203 | 5/10/2024 |