RepoDb.MySqlConnector 1.16.0-beta2
RepoDb.MySqlConnector — RepoDB for MySQL (MySqlConnector)
The MySQL provider for RepoDB — a fast, lightweight .NET ORM that lets you use raw SQL and fluent operations side by side on the same connection. Built on top of RepoDb and MySqlConnector.
Important Pages
- GitHub Home — core library and source code.
- Website — full documentation, API reference, and blog.
Community
- GitHub Issues — bug reports and feature requests.
- Microsoft Teams — live Q&A.
- GitHub Discussions — ask questions and share ideas.
- X / Twitter — news and updates.
Dependencies
- MySqlConnector — high-performance MySQL data provider.
- RepoDb — the RepoDB core library.
License
Apache-2.0 — Copyright © 2020 Michael Camara Pendon
Installation
Install-Package RepoDb.MySqlConnector
Or visit the installation page for more options.
Get Started
Initialize the bootstrapper once at application startup:
GlobalConfiguration
.Setup()
.UseMySqlConnector();
Then use any RepoDB operation directly on your MySqlConnection:
Query
using (var connection = new MySqlConnection(ConnectionString))
{
var customer = connection.Query<Customer>(c => c.Id == 10045);
}
Insert
var customer = new Customer
{
FirstName = "John",
LastName = "Doe",
IsActive = true
};
using (var connection = new MySqlConnection(ConnectionString))
{
var id = connection.Insert<Customer>(customer);
}
Update
using (var connection = new MySqlConnection(ConnectionString))
{
var customer = connection.Query<Customer>(10045);
customer.FirstName = "John";
customer.LastUpdatedUtc = DateTime.UtcNow;
var affectedRows = connection.Update<Customer>(customer);
}
Delete
using (var connection = new MySqlConnection(ConnectionString))
{
var customer = connection.Query<Customer>(10045);
var deletedCount = connection.Delete<Customer>(customer);
}
ExecuteQuery
using (var connection = new MySqlConnection(ConnectionString))
{
var customer = connection.ExecuteQuery<Customer>("SELECT * FROM `Customer` WHERE (Id = @Id);", new { Id = 10045 }).FirstOrDefault();
}
ExecuteNonQuery
using (var connection = new MySqlConnection(ConnectionString))
{
var affectedRows = connection.ExecuteNonQuery("UPDATE `Customer` SET FirstName = @FirstName WHERE (Id = @Id);", new { FirstName = "John", Id = 10045 });
}
ExecuteScalar
using (var connection = new MySqlConnection(ConnectionString))
{
var count = connection.ExecuteScalar<int>("SELECT COUNT(*) FROM `Customer`;");
}
Visit the get-started page for the full MySQL guide.
License
Apache-2.0 — Copyright © 2019 Michael Camara Pendon
No packages depend on RepoDb.MySqlConnector.
.NET 10.0
- RepoDb (>= 1.16.0-beta2)
- MySqlConnector (>= 2.6.1)
.NET 8.0
- RepoDb (>= 1.16.0-beta2)
- MySqlConnector (>= 2.6.1)
.NET 9.0
- RepoDb (>= 1.16.0-beta2)
- MySqlConnector (>= 2.6.1)
.NET Standard 2.0
- RepoDb (>= 1.16.0-beta2)
- MySqlConnector (>= 2.6.1)
| Version | Downloads | Last updated |
|---|---|---|
| 1.17.0 | 0 | 10/23/2026 |
| 1.17.0-alpha3 | 0 | 10/10/2026 |
| 1.17.0-alpha2 | 0 | 10/09/2026 |
| 1.17.0-alpha1 | 0 | 10/02/2026 |
| 1.16.0 | 0 | 09/09/2026 |
| 1.16.0-beta2 | 1 | 09/10/2026 |
| 1.16.0-beta1 | 2 | 09/10/2026 |
| 1.16.0-alpha1 | 0 | 08/08/2026 |
| 1.15.0 | 1 | 09/11/2026 |
| 1.15.0-telemetry | 0 | 07/18/2026 |
| 1.14.0 | 0 | 06/28/2026 |
| 1.13.2-alpha1 | 0 | 02/26/2024 |
| 1.13.1 | 0 | 03/16/2023 |
| 1.13.0 | 0 | 11/02/2022 |
| 1.13.0-beta1 | 0 | 10/25/2022 |
| 1.13.0-alpha2 | 0 | 10/06/2022 |
| 1.13.0-alpha1 | 0 | 09/17/2022 |
| 1.3.2-alpha1 | 0 | 02/26/2024 |
| 1.1.5 | 0 | 02/18/2022 |
| 1.1.4 | 0 | 09/23/2021 |
| 1.1.4-beta2 | 0 | 09/17/2021 |
| 1.1.4-beta1 | 0 | 03/09/2021 |
| 1.1.3 | 0 | 02/06/2021 |
| 1.1.2 | 0 | 12/30/2020 |
| 1.1.1 | 0 | 10/03/2020 |
| 1.1.0 | 0 | 09/24/2020 |
| 1.1.0-beta2 | 0 | 09/17/2020 |
| 1.1.0-beta1 | 0 | 08/28/2020 |
| 1.0.4 | 0 | 08/02/2020 |
| 1.0.3 | 0 | 07/20/2020 |
| 1.0.2 | 0 | 07/15/2020 |
| 1.0.1 | 0 | 06/06/2020 |
| 1.0.0 | 0 | 05/30/2020 |