Regira.DAL.MySQL 6.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Regira.DAL.MySQL --version 6.1.1
                    
NuGet\Install-Package Regira.DAL.MySQL -Version 6.1.1
                    
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="Regira.DAL.MySQL" Version="6.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Regira.DAL.MySQL" Version="6.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Regira.DAL.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 Regira.DAL.MySQL --version 6.1.1
                    
#r "nuget: Regira.DAL.MySQL, 6.1.1"
                    
#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 Regira.DAL.MySQL@6.1.1
                    
#: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=Regira.DAL.MySQL&version=6.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Regira.DAL.MySQL&version=6.1.1
                    
Install as a Cake Tool

Regira DAL — MySQL

Regira DAL.MySQL provides MySQL/MariaDB connectivity via Dapper, plus backup/restore via MySqlBackup.NET.

Projects

Project Package Backend CRUD Backup / Restore
DAL.MySQL Regira.DAL.MySQL MySQL / MariaDB via Dapper
DAL.MySQL.MySqlBackup Regira.DAL.MySQL.MySqlBackup MySQL / MariaDB ✓ (MySqlBackup.NET)

Installation

<PackageReference Include="Regira.DAL.MySQL"             Version="6.*" />
<PackageReference Include="Regira.DAL.MySQL.MySqlBackup" Version="6.*" />

MySqlSettings

Property Type Description
Host string Hostname
DatabaseName string Target database
Port string Default "3306"
Username string? Auth username
Password string? Auth password
var settings = new MySqlSettings("localhost", "mydb", username: "root", password: "pass");
string cs    = settings.BuildConnectionString();

MySqlCommunicator

Extends DbCommunicator<MySqlConnection> (Dapper). Execute raw queries via the underlying DbConnection.

var comm = new MySqlCommunicator(settings.BuildConnectionString());
var rows = await comm.OpenDbConnection.QueryAsync<Product>("SELECT * FROM products");

SQLDumpManager

Corrects query ordering in a SQL dump file to ensure foreign key constraints are satisfied during restoration.

var settings = new MySqlSettings("localhost", "mydb", username: "root", password: "pass");
string sqlDumpContent = await File.ReadAllTextAsync("dump.sql");

var mgr = new SQLDumpManager(settings, null); // null splitter → SQLDumpManager.DefaultSplitter
mgr.OnAction += (msg, data) => Console.WriteLine(msg);

var result = await mgr.CorrectQuerySequence(sqlDumpContent);
// result.Output  — corrected SQL
// result.Failed  — queries that could not be ordered

MySqlBackupService / MySqlRestoreService

Stream-based — no temp files.

var settings = new MySqlSettings("localhost", "mydb", username: "root", password: "pass");
var options  = new MySqlBackupOptions { DbSettings = settings };

IMemoryFile backup = await new MySqlBackupService(options).Backup();
await new MySqlRestoreService(options).Restore(backup);

Backup/Restore contracts

Both services implement the shared contracts from Common:

public interface IDbBackupService  { Task<IMemoryFile> Backup(); }
public interface IDbRestoreService { Task Restore(IMemoryFile file); }

Overview

  1. Index — Settings, communicator, backup/restore
  2. Examples — Connect, query, backup, and restore

License

Apache License 2.0 — this package contains no license validation and no runtime limits. See LICENSE. A few companion packages are commercially licensed with a free tier; see the licensing overview.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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 Regira.DAL.MySQL:

Package Downloads
Regira.DAL.MySQL.MySqlBackup

MySQL database backup support for Regira using MySqlBackup.NET.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.1.2 102 8/16/2026
6.1.1 106 8/12/2026
6.1.0 118 8/10/2026