Skip to content

Commit 59ca87e

Browse files
committed
Add package README. Fixes #978
1 parent ad2b235 commit 59ca87e

File tree

3 files changed

+59
-2
lines changed

3 files changed

+59
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Async MySQL Connector for .NET and .NET Core
22

3-
This is an [ADO.NET](https://msdn.microsoft.com/en-us/library/e80y5yhx.aspx) data
3+
This is an [ADO.NET](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/) data
44
provider for [MySQL](https://www.mysql.com/). It provides implementations of
55
`DbConnection`, `DbCommand`, `DbDataReader`, `DbTransaction`—the classes
66
needed to query and update databases from managed code.

src/MySqlConnector/MySqlConnector.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net45;net461;net471;netstandard1.3;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
5-
<Title>Async MySQL ADO.NET Connector</Title>
65
<Description>A truly async MySQL ADO.NET provider, supporting MySQL Server, MariaDB, Percona Server, Amazon Aurora, Azure Database for MySQL and more.</Description>
76
<Copyright>Copyright 2016–2021 Bradley Grainger</Copyright>
87
<Authors>Bradley Grainger;Caleb Lloyd</Authors>
98
<AssemblyName>MySqlConnector</AssemblyName>
109
<PackageId>MySqlConnector</PackageId>
10+
<PackageReadmeFile>README.md</PackageReadmeFile>
1111
<PackageTags>mysql;mysqlconnector;async;ado.net;database;netcore</PackageTags>
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1313
<Nullable>enable</Nullable>
@@ -36,4 +36,8 @@
3636
<InternalsVisibleTo Include="SideBySide" Key="00240000048000001402000006020000002400005253413100100000010001000521c81bf0f0ec7b261bb89bb583611d3767205d542c16c9353e317455acf612d3ec3dd03b77e7e6fda1aa8f15c58576d90dae0fb9f4fd4bd48709ae199b8c771963fa67d70b35f7ed2fbb6c60423935adfae0606716ea6ce31a1fcd56fdb206fc0c3b1205ec6ba56fb20c14c42105a601ddd0bfaea7207d535b29a39ffe82f00880f4f64f86e6bcf26eb5242a133bad9d7a32e3126036b68b13b413ce4097dfc18d9a5b1e494f1aed54dc84d7089fd0d931a49e679fdc7c8f07a5121df38ec27c2c9993a8f8f136b2937849aed32aef7324a5b7e482dc2eb693c7988f6074e82e75a41dd001587be4d79108588b25d40ed9aeb30ff921edaf509c94f71428e48219ba940f5f10c061421dc0c006e09feadec30df20b2d13d02c3ce4ceb32b6fbefd254288d45f3bb2c425b197e19699d7efdfc7aba5dd45b727bc98abd866d2f6e69e33a64e4b5a5ab1e4d749266c7bf285550da9fb036f10eff76b697de9c5ed8de4a3cdbca1174543540bed6c3a95641cfdacbac834896639f8a75ed1fb9cfd9983d83d0b43b76bd3894bd2b3da0dd23d1e0362985217f087acce1a7f56546c214890acae8fc60e27890ff31c38578f85e220342061a1a5c867362a14aafdffa003dc13af064f5f860d1757883ea5237feed3a6228c86200062bd88f5592d5c399ef270a562d458ae8eac5eaa382b5bcc3f64298cc34b4598f0b33d7943b8" />
3737
</ItemGroup>
3838

39+
<ItemGroup>
40+
<None Include="docs\README.md" Pack="true" PackagePath="\"/>
41+
</ItemGroup>
42+
3943
</Project>

src/MySqlConnector/docs/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# MySqlConnector
2+
3+
## About
4+
5+
MySqlConnector is an [ADO.NET](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/) data provider for [MySQL](https://www.mysql.com/), [MariaDB](https://mariadb.org/), [Amazon Aurora](https://aws.amazon.com/rds/aurora/), [Azure Database for MySQL](https://azure.microsoft.com/en-us/services/mysql/) and other MySQL-compatible databases. It provides implementations of `DbConnection`, `DbCommand`, `DbDataReader`, `DbTransaction`—the classes needed to query and update databases from managed code.
6+
7+
Complete documentation is available at the [MySqlConnector Documentation Website](https://mysqlconnector.net/).
8+
9+
## How to Use
10+
11+
```csharp
12+
// set these values correctly for your database server
13+
var builder = new MySqlConnectionStringBuilder
14+
{
15+
Server = "your-server",
16+
UserID = "database-user",
17+
Password = "P@ssw0rd!",
18+
Database = "database-name",
19+
};
20+
21+
// open a connection asynchronously
22+
using var connection = new MySqlConnection(builder.ConnectionString);
23+
await connection.OpenAsync();
24+
25+
// create a DB command and set the SQL statement with parameters
26+
using var command = connection.CreateCommand();
27+
command.CommandText = @"SELECT * FROM orders WHERE order_id = @OrderId;";
28+
command.Parameters.AddWithValue("@OrderId", orderId);
29+
30+
// execute the command and read the results
31+
using var reader = await command.ExecuteReaderAsync();
32+
while (reader.Read())
33+
{
34+
var id = reader.GetInt32("order_id");
35+
var date = reader.GetDateTime("order_date");
36+
// ...
37+
}
38+
```
39+
40+
## Key Features
41+
42+
* Full support for async I/O
43+
* High performance
44+
* Supports. NET Framework, .NET Core, and .NET 5.0+
45+
46+
## Related Packages
47+
48+
* Entity Framework Core: [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/)
49+
* Logging: [log4net](https://www.nuget.org/packages/MySqlConnector.Logging.log4net/), [Microsoft.Extensions](https://www.nuget.org/packages/MySqlConnector.Logging.Microsoft.Extensions.Logging/), [NLog](https://www.nuget.org/packages/MySqlConnector.Logging.NLog/), [Serilog](https://www.nuget.org/packages/MySqlConnector.Logging.Serilog/)
50+
51+
## Feedback
52+
53+
MySqlConnector is released as open source under the [MIT license](https://github.com/mysql-net/MySqlConnector/blob/master/LICENSE). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/mysql-net/MySqlConnector).

0 commit comments

Comments
 (0)