Audit.NET.MySql
27.1.1
dotnet add package Audit.NET.MySql --version 27.1.1
NuGet\Install-Package Audit.NET.MySql -Version 27.1.1
<PackageReference Include="Audit.NET.MySql" Version="27.1.1" />
paket add Audit.NET.MySql --version 27.1.1
#r "nuget: Audit.NET.MySql, 27.1.1"
// Install Audit.NET.MySql as a Cake Addin #addin nuget:?package=Audit.NET.MySql&version=27.1.1 // Install Audit.NET.MySql as a Cake Tool #tool nuget:?package=Audit.NET.MySql&version=27.1.1
Audit.NET.MySql
MySQL provider for Audit.NET library (An extensible framework to audit executing operations in .NET).
Store the audit events in a MySQL Table.
Install
NuGet Package To install the package run the following command on the Package Manager Console:
PM> Install-Package Audit.NET.MySql
Usage
Please see the Audit.NET Readme
Configuration
Set the static Audit.Core.Configuration.DataProvider
property to set the MySQL data provider, or call the UseMySql
method on the fluent configuration. This should be done before any AuditScope
creation, i.e. during application startup.
For example:
Audit.Core.Configuration.DataProvider = new MySqlDataProvider()
{
ConnectionString = "Server=localhost; Database=events; Uid=admin; Pwd=admin;",
TableName = "events",
IdColumnName = "event_id",
JsonColumnName = "data",
CustomColumns = new List<CustomColumn>()
{
new CustomColumn("user", ev => ev.Environment.UserName)
}
};
Or by using the fluent configuration API:
Audit.Core.Configuration.Setup()
.UseMySql(config => config
.ConnectionString("Server=localhost; Database=events; Uid=admin; Pwd=admin;")
.TableName("events")
.IdColumnName("event_id")
.JsonColumnName("data")
.CustomColumn("user", ev => ev.Environment.UserName));
Provider Options
- ConnectionString: The MySQL connection string.
- TableName: The table name that stores the audit events.
- IdColumnName: The column name of the event identifier (the primary key column name).
- JsonColumnName: The column name of the event table where the event JSON will be stored. (optional)
- CustomColumn: Additional columns to store information from the audit event. (optional)
Query events
This provider implements GetEvent
and GetEventAsync
methods to obtain an audit event by id
var event = mySqlDataProvider.GetEvent(1000);
Table constraints
- The table should exists.
- The table should have a single ID column (Primary key).
For example:
CREATE TABLE event
(
id INT unsigned NOT NULL AUTO_INCREMENT,
inserted_date DATETIME DEFAULT CURRENT_TIMESTAMP,
last_updated_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
data JSON NOT NULL,
user VARCHAR(20) NULL,
PRIMARY KEY (id)
);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Audit.NET (>= 27.1.1)
- MySqlConnector (>= 2.3.1)
-
.NETStandard 2.0
- Audit.NET (>= 27.1.1)
- MySqlConnector (>= 2.3.1)
-
net6.0
- Audit.NET (>= 27.1.1)
- MySqlConnector (>= 2.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
27.1.1 | 77 | 10/28/2024 |
27.1.0 | 86 | 10/24/2024 |
27.0.3 | 236 | 9/25/2024 |
27.0.2 | 221 | 9/19/2024 |
27.0.1 | 140 | 9/4/2024 |
27.0.0 | 102 | 9/3/2024 |
26.0.1 | 201 | 8/22/2024 |
26.0.0 | 1,321 | 7/19/2024 |
25.0.7 | 275 | 7/4/2024 |
25.0.6 | 3,744 | 6/24/2024 |
25.0.5 | 535 | 6/18/2024 |
25.0.4 | 4,073 | 3/24/2024 |
25.0.3 | 378 | 3/13/2024 |
25.0.2 | 182 | 3/12/2024 |
25.0.1 | 978 | 2/28/2024 |
25.0.0 | 336 | 2/16/2024 |
24.0.1 | 165 | 2/12/2024 |
24.0.0 | 106 | 2/12/2024 |
23.0.0 | 7,640 | 12/14/2023 |
22.1.0 | 137 | 12/9/2023 |
22.0.2 | 1,591 | 12/1/2023 |
22.0.1 | 317 | 11/16/2023 |
22.0.0 | 158 | 11/14/2023 |
21.1.0 | 4,601 | 10/9/2023 |
21.0.4 | 7,290 | 9/15/2023 |
21.0.3 | 2,660 | 7/9/2023 |
21.0.2 | 1,212 | 7/6/2023 |
21.0.1 | 1,795 | 5/27/2023 |
21.0.0 | 6,044 | 4/15/2023 |
20.2.4 | 670 | 3/27/2023 |
20.2.3 | 440 | 3/17/2023 |
20.2.2 | 615 | 3/14/2023 |
20.2.1 | 334 | 3/11/2023 |
20.2.0 | 305 | 3/7/2023 |
20.1.6 | 1,111 | 2/23/2023 |
20.1.5 | 395 | 2/9/2023 |
20.1.4 | 4,424 | 1/28/2023 |
20.1.3 | 10,362 | 12/21/2022 |
20.1.2 | 378 | 12/14/2022 |
20.1.1 | 399 | 12/12/2022 |
20.1.0 | 654 | 12/4/2022 |
20.0.4 | 480 | 11/30/2022 |
20.0.3 | 1,402 | 10/28/2022 |
20.0.2 | 495 | 10/26/2022 |
20.0.1 | 581 | 10/21/2022 |
20.0.0 | 779 | 10/1/2022 |
19.4.1 | 4,087 | 9/10/2022 |
19.4.0 | 601 | 9/2/2022 |
19.3.0 | 568 | 8/23/2022 |
19.2.2 | 4,768 | 8/11/2022 |
19.2.1 | 606 | 8/6/2022 |
19.2.0 | 1,421 | 7/24/2022 |
19.1.4 | 4,820 | 5/23/2022 |
19.1.3 | 569 | 5/22/2022 |
19.1.2 | 623 | 5/18/2022 |
19.1.1 | 753 | 4/28/2022 |
19.1.0 | 4,954 | 4/10/2022 |
19.0.7 | 1,306 | 3/13/2022 |
19.0.6 | 2,620 | 3/7/2022 |
19.0.5 | 4,345 | 1/28/2022 |
19.0.4 | 579 | 1/23/2022 |
19.0.3 | 2,452 | 12/14/2021 |
19.0.2 | 414 | 12/11/2021 |
19.0.1 | 938 | 11/20/2021 |
19.0.0 | 490 | 11/11/2021 |
19.0.0-rc.net60.2 | 181 | 9/26/2021 |
19.0.0-rc.net60.1 | 221 | 9/16/2021 |
18.1.6 | 1,107 | 9/26/2021 |
18.1.5 | 4,206 | 9/7/2021 |
18.1.4 | 498 | 9/6/2021 |
18.1.3 | 3,060 | 8/19/2021 |
18.1.2 | 597 | 8/8/2021 |
18.1.1 | 568 | 8/5/2021 |
18.1.0 | 572 | 8/1/2021 |
18.0.1 | 560 | 7/30/2021 |
18.0.0 | 4,331 | 7/26/2021 |
17.0.8 | 628 | 7/7/2021 |
17.0.7 | 646 | 6/16/2021 |
17.0.6 | 619 | 6/5/2021 |
17.0.5 | 619 | 5/28/2021 |
17.0.4 | 602 | 5/4/2021 |
17.0.3 | 550 | 5/1/2021 |
17.0.2 | 510 | 4/22/2021 |
17.0.1 | 541 | 4/18/2021 |
17.0.0 | 876 | 3/26/2021 |
16.5.6 | 573 | 3/25/2021 |
16.5.5 | 549 | 3/23/2021 |
16.5.4 | 624 | 3/9/2021 |
16.5.3 | 544 | 2/26/2021 |
16.5.2 | 584 | 2/23/2021 |
16.5.1 | 573 | 2/21/2021 |
16.5.0 | 642 | 2/17/2021 |
16.4.5 | 1,090 | 2/15/2021 |
16.4.4 | 574 | 2/5/2021 |
16.4.3 | 526 | 1/27/2021 |
16.4.2 | 550 | 1/22/2021 |
16.4.1 | 617 | 1/21/2021 |
16.4.0 | 597 | 1/11/2021 |
16.3.3 | 577 | 1/8/2021 |
16.3.2 | 1,281 | 1/3/2021 |
16.3.1 | 677 | 12/31/2020 |
16.3.0 | 576 | 12/30/2020 |
16.2.1 | 2,087 | 12/27/2020 |
16.2.0 | 8,068 | 10/13/2020 |
16.1.5 | 817 | 10/4/2020 |
16.1.4 | 676 | 9/17/2020 |
16.1.3 | 778 | 9/13/2020 |
16.1.2 | 661 | 9/9/2020 |
16.1.1 | 653 | 9/3/2020 |
16.1.0 | 803 | 8/19/2020 |
16.0.3 | 734 | 8/15/2020 |
16.0.2 | 659 | 8/9/2020 |
16.0.1 | 696 | 8/8/2020 |
16.0.0 | 636 | 8/7/2020 |
15.3.0 | 799 | 7/23/2020 |
15.2.3 | 673 | 7/14/2020 |
15.2.2 | 2,050 | 5/19/2020 |
15.2.1 | 634 | 5/12/2020 |
15.2.0 | 708 | 5/9/2020 |
15.1.1 | 694 | 5/4/2020 |
15.1.0 | 722 | 4/13/2020 |
15.0.5 | 713 | 3/18/2020 |
15.0.4 | 718 | 2/28/2020 |
15.0.3 | 696 | 2/26/2020 |
15.0.2 | 16,211 | 1/20/2020 |
15.0.1 | 1,494 | 1/10/2020 |
15.0.0 | 1,405 | 12/17/2019 |
14.9.1 | 1,079 | 11/30/2019 |
14.9.0 | 716 | 11/29/2019 |
14.8.1 | 735 | 11/26/2019 |
14.8.0 | 753 | 11/20/2019 |
14.7.0 | 32,511 | 10/9/2019 |
14.6.6 | 749 | 10/8/2019 |
14.6.5 | 817 | 9/27/2019 |
14.6.4 | 745 | 9/21/2019 |
14.6.3 | 2,004 | 8/12/2019 |
14.6.2 | 775 | 8/3/2019 |
14.6.1 | 757 | 8/3/2019 |
14.6.0 | 770 | 7/26/2019 |
14.5.7 | 2,552 | 7/18/2019 |
14.5.6 | 11,368 | 7/10/2019 |
14.5.5 | 781 | 7/1/2019 |
14.5.4 | 785 | 6/17/2019 |
14.5.3 | 810 | 6/5/2019 |
14.5.2 | 773 | 5/30/2019 |
14.5.1 | 815 | 5/28/2019 |
14.5.0 | 809 | 5/24/2019 |
14.4.0 | 813 | 5/22/2019 |
14.3.4 | 831 | 5/14/2019 |
14.3.3 | 830 | 5/9/2019 |
14.3.2 | 859 | 4/30/2019 |
14.3.1 | 831 | 4/27/2019 |
14.3.0 | 879 | 4/24/2019 |
14.2.3 | 848 | 4/17/2019 |
14.2.2 | 7,196 | 4/10/2019 |
14.2.1 | 811 | 4/5/2019 |
14.2.0 | 2,236 | 3/16/2019 |
14.1.1 | 784 | 3/8/2019 |
14.1.0 | 3,562 | 2/11/2019 |
14.0.4 | 985 | 1/31/2019 |
14.0.3 | 924 | 1/22/2019 |
14.0.2 | 2,105 | 12/15/2018 |
14.0.1 | 1,011 | 11/29/2018 |
14.0.0 | 1,104 | 11/19/2018 |
13.3.0 | 1,499 | 11/16/2018 |
13.2.2 | 1,112 | 11/15/2018 |
13.2.1 | 1,083 | 11/13/2018 |
13.2.0 | 1,082 | 10/31/2018 |
13.1.5 | 1,112 | 10/31/2018 |
13.1.4 | 1,093 | 10/25/2018 |
13.1.3 | 1,095 | 10/18/2018 |
13.1.2 | 1,911 | 9/12/2018 |
13.1.1 | 1,132 | 9/11/2018 |
13.1.0 | 1,120 | 9/11/2018 |
13.0.0 | 7,828 | 8/29/2018 |
12.3.6 | 1,165 | 8/29/2018 |
12.3.5 | 1,178 | 8/22/2018 |
12.3.4 | 1,207 | 8/21/2018 |
12.3.3 | 26,005 | 8/21/2018 |
12.3.2 | 1,247 | 8/20/2018 |
12.3.1 | 1,220 | 8/20/2018 |
12.3.0 | 1,223 | 8/20/2018 |
12.2.2 | 1,279 | 8/15/2018 |
12.2.1 | 1,252 | 8/9/2018 |
12.2.0 | 1,207 | 8/8/2018 |
12.1.11 | 1,203 | 7/30/2018 |
12.1.10 | 1,258 | 7/20/2018 |
12.1.9 | 1,331 | 7/10/2018 |
12.1.8 | 1,274 | 7/2/2018 |
12.1.7 | 1,253 | 6/7/2018 |
12.1.6 | 1,360 | 6/4/2018 |
12.1.5 | 1,387 | 6/2/2018 |
12.1.4 | 1,420 | 5/25/2018 |
12.1.3 | 1,395 | 5/16/2018 |
12.1.2 | 1,300 | 5/15/2018 |
12.1.1 | 1,446 | 5/14/2018 |
12.1.0 | 1,390 | 5/9/2018 |
12.0.7 | 1,363 | 5/5/2018 |
12.0.6 | 1,478 | 5/4/2018 |
12.0.5 | 1,401 | 5/3/2018 |
12.0.4 | 1,493 | 4/30/2018 |
12.0.3 | 1,448 | 4/30/2018 |
12.0.2 | 1,410 | 4/27/2018 |
12.0.1 | 1,409 | 4/25/2018 |
12.0.0 | 1,378 | 4/22/2018 |
11.2.0 | 1,398 | 4/11/2018 |
11.1.0 | 1,497 | 4/8/2018 |
11.0.8 | 1,440 | 3/26/2018 |
11.0.7 | 1,316 | 3/20/2018 |
11.0.6 | 1,530 | 3/7/2018 |
11.0.5 | 1,389 | 2/22/2018 |
11.0.4 | 1,476 | 2/14/2018 |
11.0.3 | 1,429 | 2/12/2018 |
11.0.2 | 1,467 | 2/9/2018 |
11.0.1 | 1,210 | 1/29/2018 |
11.0.0 | 2,836 | 1/15/2018 |
10.0.3 | 2,845 | 12/29/2017 |
10.0.2 | 2,664 | 12/26/2017 |
10.0.1 | 2,824 | 12/18/2017 |
10.0.0 | 2,741 | 12/18/2017 |
9.3.0 | 2,861 | 12/17/2017 |
9.2.0 | 2,762 | 12/17/2017 |
9.1.3 | 4,052 | 12/5/2017 |
9.1.2 | 2,753 | 11/27/2017 |
9.1.1 | 2,727 | 11/21/2017 |
9.1.0 | 2,678 | 11/21/2017 |
9.0.1 | 2,695 | 11/11/2017 |
9.0.0 | 2,770 | 11/10/2017 |
8.7.0 | 2,718 | 11/9/2017 |
8.6.0 | 2,752 | 11/9/2017 |
8.5.0 | 2,854 | 10/3/2017 |
8.4.0 | 2,775 | 10/3/2017 |
8.3.1 | 2,710 | 9/8/2017 |
8.3.0 | 2,698 | 9/8/2017 |
8.2.0 | 2,680 | 9/4/2017 |
8.1.0 | 2,734 | 8/22/2017 |
8.0.0 | 2,912 | 8/19/2017 |
7.1.3 | 2,864 | 8/14/2017 |
7.1.2 | 2,737 | 8/2/2017 |
7.1.1 | 2,726 | 7/26/2017 |
7.1.0 | 2,689 | 7/5/2017 |
7.0.9 | 2,724 | 6/28/2017 |
7.0.8 | 2,938 | 6/19/2017 |
7.0.6 | 1,346 | 4/7/2017 |
7.0.5 | 1,331 | 3/21/2017 |
7.0.4 | 1,367 | 3/21/2017 |