Anarchy.Toolkit.Infrastructure.Persistence.Mysql
1.1.3
See the version list below for details.
dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Mysql --version 1.1.3
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.Persistence.Mysql -Version 1.1.3
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Mysql" Version="1.1.3" />
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.Persistence.Mysql" Version="1.1.3" />
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Mysql" />
paket add Anarchy.Toolkit.Infrastructure.Persistence.Mysql --version 1.1.3
#r "nuget: Anarchy.Toolkit.Infrastructure.Persistence.Mysql, 1.1.3"
#:package Anarchy.Toolkit.Infrastructure.Persistence.Mysql@1.1.3
#addin nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Mysql&version=1.1.3
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Mysql&version=1.1.3
Anarchy.Toolkit.Infrastructure.Persistence.Mysql
MySQL adapter for the toolkit's relational persistence layer, using MySqlConnector.
dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Mysql
MysqlDbDialect, connection pools, unit of work, retry policy and repository bases adapt the shared relational layer to MySQL.- Register an
Observerin DI and configureModuleMysqlwith connection and resilience options factories;AddMysqlHealthReports()adds reader and writer checks. - The unkeyed storage policy uses the writer; use the
readerkey for read-only operations. Port 3306 is the default. - Named session time zones require populated MySQL time-zone tables. Retry the whole unit of work rather than individual commands inside a transaction.
When to use it
Use this adapter for a MySQL-backed application that needs the toolkit's relational policies, unit of work and repository bases. The consuming application supplies its schema, migrations and MySQL-specific queries.
How to use it
- Register an
Observerand useModuleMysqlwith factories forMysqlConnectionOptionsandMysqlResilienceOptions. Obtain hosts and credentials from the environment or a secret provider rather than committing them. - Configure reader/writer hosts, database name, command timeout and optional session time zone. The port defaults to 3306 and
MaximumPoolSizedefaults to 100; tune pool size for the database and number of application instances. - Implement repositories with the MySQL bases and select the keyed
readerpolicy for read-only work. The unkeyed policy uses the writer. AddAddMysqlHealthReports()if the host should check both endpoints. - Validate the integration against a dedicated MySQL test database using
Testing.Mysql. If a transaction fails, retry the whole unit of work rather than individual statements inside it.
See the MySQL usage notes and Testing.Mysql.
Releases
1.1.3
- chore(docs): Update release notes
1.1.2
- build: migrate local automation to NUKE
1.1.1
- docs: expand package guides and release histories
- chore(deps): update AWS, Polly, and xUnit packages
1.1.0
- Applied the configurable maximum pool size to MySQL connection strings.
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced the MySQL relational persistence provider, connection handling and provider-specific health reports.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Anarchy.Toolkit.Core (>= 1.0.4)
- Anarchy.Toolkit.Infrastructure.Persistence.Db (>= 1.1.3)
- Dapper (= 2.1.79)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- MySqlConnector (>= 2.6.2)
- Newtonsoft.Json (>= 13.0.4)
- Polly.Core (>= 8.9.1)
- Serilog (>= 4.4.0)
- Serilog.Sinks.Console (>= 6.1.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Anarchy.Toolkit.Infrastructure.Persistence.Mysql:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Testing.Mysql
MySQL integration-test fixtures, settings mapping, enum handlers and table reset helpers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.