Regira.DAL.MySQL
6.1.1
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
<PackageReference Include="Regira.DAL.MySQL" Version="6.1.1" />
<PackageVersion Include="Regira.DAL.MySQL" Version="6.1.1" />
<PackageReference Include="Regira.DAL.MySQL" />
paket add Regira.DAL.MySQL --version 6.1.1
#r "nuget: Regira.DAL.MySQL, 6.1.1"
#:package Regira.DAL.MySQL@6.1.1
#addin nuget:?package=Regira.DAL.MySQL&version=6.1.1
#tool nuget:?package=Regira.DAL.MySQL&version=6.1.1
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
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 | Versions 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. |
-
net10.0
- Dapper (>= 2.1.79)
- MySqlConnector (>= 2.6.1)
- Regira.Common (>= 6.1.1)
-
net8.0
- Dapper (>= 2.1.79)
- MySqlConnector (>= 2.6.1)
- Regira.Common (>= 6.1.1)
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.