FAkka.MySqlConnector
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FAkka.MySqlConnector --version 1.0.0
NuGet\Install-Package FAkka.MySqlConnector -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="FAkka.MySqlConnector" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FAkka.MySqlConnector --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FAkka.MySqlConnector, 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.
// Install FAkka.MySqlConnector as a Cake Addin #addin nuget:?package=FAkka.MySqlConnector&version=1.0.0 // Install FAkka.MySqlConnector as a Cake Tool #tool nuget:?package=FAkka.MySqlConnector&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
MySqlConnector is a C# ADO.NET driver for MySQL, MariaDB, Amazon Aurora, Azure Database for MySQL and other MySQL-compatible databases.
More documentation is available at the MySqlConnector website.
How to Use
// set these values correctly for your database server
var builder = new MySqlConnectionStringBuilder
{
Server = "your-server",
UserID = "database-user",
Password = "P@ssw0rd!",
Database = "database-name",
};
// open a connection asynchronously
using var connection = new MySqlConnection(builder.ConnectionString);
await connection.OpenAsync();
// create a DB command and set the SQL statement with parameters
using var command = connection.CreateCommand();
command.CommandText = @"SELECT * FROM orders WHERE order_id = @OrderId;";
command.Parameters.AddWithValue("@OrderId", orderId);
// execute the command and read the results
using var reader = await command.ExecuteReaderAsync();
while (reader.Read())
{
var id = reader.GetInt32("order_id");
var date = reader.GetDateTime("order_date");
// ...
}
Key Features
- Full support for async I/O
- High performance
- Supports .NET Framework, .NET Core, and .NET 5.0+
Main Types
The main types provided by this library are:
MySqlConnection
(implementation ofDbConnection
)MySqlCommand
(implementation ofDbCommand
)MySqlDataReader
(implementation ofDbDataReader
)MySqlBulkCopy
MySqlBulkLoader
MySqlConnectionStringBuilder
MySqlConnectorFactory
MySqlDataAdapter
MySqlException
MySqlTransaction
(implementation ofDbTransaction
)
Related Packages
- Entity Framework Core: Pomelo.EntityFrameworkCore.MySql
- Logging: log4net, Microsoft.Extensions.Logging, NLog, Serilog
Feedback
MySqlConnector is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FAkka.MySqlConnector:
Package | Downloads |
---|---|
FAkka.Shared
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.