ArturRios.Data.MySql 1.0.0

dotnet add package ArturRios.Data.MySql --version 1.0.0
                    
NuGet\Install-Package ArturRios.Data.MySql -Version 1.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="ArturRios.Data.MySql" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArturRios.Data.MySql" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ArturRios.Data.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 ArturRios.Data.MySql --version 1.0.0
                    
#r "nuget: ArturRios.Data.MySql, 1.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 ArturRios.Data.MySql@1.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=ArturRios.Data.MySql&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ArturRios.Data.MySql&version=1.0.0
                    
Install as a Cake Tool

ArturRios.Data.MySql

NuGet Docs License: MIT

The MySQL / MariaDB provider for the ArturRios.Data toolkit, backed by Microting.EntityFrameworkCore.MySql. It plugs MySQL into ArturRios.Data.Relational.Core via a single IDatabaseProvider registration — your entities, repositories, and unit of work stay exactly the same as with any other engine.

This package is a thin provider. All the repository and transaction surface lives in ArturRios.Data.Relational.Core, which you install alongside it.

Installation

dotnet add package ArturRios.Data.Relational.Core
dotnet add package ArturRios.Data.MySql

Requires .NET 10.0 or later.

Quick start

1. Configure (appsettings.json, default section "ArturRios.Data.Core"):

{
  "ArturRios.Data.Core": {
    "DatabaseType": "MySql",
    "ConnectionString": "Server=localhost;Database=mydb;User=app;Password=secret;"
  }
}

2. Register the provider before the data layer (Program.cs):

using ArturRios.Data.MySql;                            // brings AddMySqlProvider()
using ArturRios.Data.Relational.Core.DependencyInjection;

builder.Services.AddMySqlProvider();
builder.Services.AddDataConfigFromSettings<AppDbContext>(builder.Configuration, "ArturRios.Data.Core");

That's the whole provider-specific surface. From here on you use IAsyncRepository<T>, IAsyncUnitOfWork, and the rest of the core API — see the Relational guide.

What it does

AddMySqlProvider() registers MySqlProvider as a singleton IDatabaseProvider with Type => DatabaseType.MySql. When AddDataConfigFromSettings<TContext> builds your context and the configured DatabaseType is MySql, this provider is selected and calls UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)). Note that AutoDetect opens a connection to the server to determine its version, so the server must be reachable when the context options are built.

If the configured DatabaseType has no matching provider registered, registration fails fast with a DataAccessException naming the missing provider.

A note on the underlying EF Core provider

This package depends on Microting.EntityFrameworkCore.MySql, an MIT-licensed, actively maintained fork of Pomelo.EntityFrameworkCore.MySql. Upstream Pomelo's latest release (9.0.0) still targets EF Core 9 and has no EF Core 10 build; the fork tracks EF Core 10 patch releases and keeps Pomelo's API and its MIT MySqlConnector driver (true async, MariaDB support).

The dependency is pinned to an exact fork version, because the fork constrains Microsoft.EntityFrameworkCore.Relational to [10.0.10, 10.0.999]. The EF Core provider is not part of this package's public API — only MySqlProvider and AddMySqlProvider() are — so if upstream Pomelo ships an EF Core 10 release, swapping back is an internal change here rather than a change to your code.

Documentation

Licensed under the MIT License.

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

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
1.0.0 106 8/24/2026