Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql 3.0.0

dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql --version 3.0.0
                    
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql --version 3.0.0
                    
#r "nuget: Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql&version=3.0.0
                    
Install as a Cake Tool

Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql

Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Infrastructure · Package catalog

MySQL adapter for the toolkit's relational persistence layer, using MySqlConnector.

dotnet add package Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql
  • MysqlDbDialect, connection pools, unit of work, retry policy and repository bases adapt the shared relational layer to MySQL.
  • Register AppTelemetry in DI and configure ModuleMysql with connection and resilience options factories; AddMysqlHealthReports() adds reader and writer checks.
  • The unkeyed storage policy uses the writer; use the reader key 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

  1. Register AppTelemetry and use ModuleMysql with factories for MysqlConnectionOptions and MysqlResilienceOptions. Obtain hosts and credentials from the environment or a secret provider rather than committing them.
  2. Configure reader/writer hosts, database name, command timeout and optional session time zone. The port defaults to 3306 and MaximumPoolSize defaults to 100; tune pool size for the database and number of application instances.
  3. Implement repositories with the MySQL bases and select the keyed reader policy for read-only work. The unkeyed policy uses the writer. Add AddMysqlHealthReports() if the host should check both endpoints.
  4. Validate the integration against a dedicated MySQL test database using Testing.Db.Mysql. If a transaction fails, retry the whole unit of work rather than individual statements inside it.

See the MySQL usage notes and Testing.Db.Mysql.

Third-party dependencies

This package brings these libraries, which its name does not announce:

Library Why In the public API?
Dapper (through Infrastructure.Persistence.Db) Runs the repositories' SQL and maps results Yes: through Infrastructure.Persistence.Db's type handlers
Polly (Polly.Core, through Infrastructure.Persistence.Db) Retries transient database failures Yes: through the resilience policy builder

Releases

See the release notes for the complete release history.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Anarchy.Toolkit.Infrastructure.Persistence.Db.Mysql:

Package Downloads
Anarchy.Toolkit.Testing.Db.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.

Version Downloads Last Updated
3.0.0 51 11/27/2026
2.0.0 73 11/24/2026
1.0.1 93 11/21/2026
1.0.0 95 11/20/2026

## Releases

### 3.0.0

- **Breaking:** extension classes take the `Extensions` suffix under `Extensions/<extended namespace>/`, helpers live in `Helpers/<Subject>/`, and their namespaces follow those folders: update `using` directives.
- **Breaking:** depends on the new major versions of `Infrastructure.Persistence.Db`.

### 2.0.0

- Update dependencies for the relational event-persistence split and event contract changes.

### 1.0.1

- chore(build): Format package release notes property

### 1.0.0

- New package identity, renamed from `Anarchy.Toolkit.Infrastructure.Persistence.Mysql`; versions below are historical releases under that package ID.
- Preserve unit-of-work failures and use provider-neutral application telemetry.

### Historical releases under `Anarchy.Toolkit.Infrastructure.Persistence.Mysql`

### 1.2.1

- docs(packages): identify each package's pillar and layer
- build(packages): attribute the copyright to Leandro Melão Medeiros
- build: relicense under Apache-2.0 and update the package metadata

### 1.2.0

- build(deps): upgrade Swashbuckle.AspNetCore to 11.0.1 and Microsoft.OpenApi to 3.11.1

### 1.1.5

- docs: expand XML docblocks across all projects for the DocFX API reference

### 1.1.4

- refactor(src): clean up code style across library packages
- chore(deps): update AWS SDK, Lambda ASP.NET Core server and MySqlConnector packages

### 1.1.2

- build: migrate local automation to build tooling

### 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.