## About
MySqlConnector is a C# [ADO.NET](https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/) driver 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.
More documentation is available at the [MySqlConnector website](https://mysqlconnector.net/).
## How to Use
```csharp
// 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");
// ...
}
```
### ASP.NET
For ASP.NET, use the [MySqlConnector.DependencyInjection package](https://www.nuget.org/packages/MySqlConnector.DependencyInjection/) to integrate with dependency injection and logging.
```csharp
var builder = WebApplication.CreateBuilder(args);
// use AddMySqlDataSource to configure MySqlConnector
builder.Services.AddMySqlDataSource(builder.Configuration.GetConnectionString("Default"));
var app = builder.Build();
// use dependency injection to get a MySqlConnection in minimal APIs or in controllers
app.MapGet("/", async (MySqlConnection connection) =>
{
// open and use the connection here
await connection.OpenAsync();
await using var command = connection.CreateCommand();
command.CommandText = "SELECT name FROM users LIMIT 1";
return "Hello World: " + await command.ExecuteScalarAsync();
});
app.Run();
```
## 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 of `DbConnection`)
* `MySqlCommand` (implementation of `DbCommand`)
* `MySqlDataReader` (implementation of `DbDataReader`)
* `MySqlBulkCopy`
* `MySqlBulkLoader`
* `MySqlConnectionStringBuilder`
* `MySqlConnectorFactory`
* `MySqlDataAdapter`
* `MySqlException`
* `MySqlTransaction` (implementation of `DbTransaction`)
## Related Packages
* Dependency Injection: [MySqlConnector.DependencyInjection](https://www.nuget.org/packages/MySqlConnector.DependencyInjection/)
* Entity Framework Core: [Pomelo.EntityFrameworkCore.MySql](https://www.nuget.org/packages/Pomelo.EntityFrameworkCore.MySql/)
## Feedback
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).
没有合适的资源?快使用搜索试试~ 我知道了~
c#实现简单的学生/员工管理系统
共283个文件
dll:91个
xml:49个
_:39个
需积分: 2 0 下载量 173 浏览量
2024-05-07
14:25:20
上传
评论
收藏 11.09MB ZIP 举报
温馨提示
c#实现简单的管理系统,实现增删改查对数据库操作
资源推荐
资源详情
资源评论
收起资源包目录
c#实现简单的学生/员工管理系统 (283个子文件)
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
_._ 0B
StudentManage.csprojAssemblyReference.cache 85KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferences.cache 1KB
StudentManage.csproj.GenerateResource.cache 1KB
StudentManage.csproj.CoreCompileInputs.cache 42B
packages.config 773B
App.config 565B
bz_manage.exe.config 565B
StudentManage.csproj.CopyComplete 0B
UpdateEp.Designer.cs 9KB
AddEp.Designer.cs 9KB
DBOperate.cs 7KB
Form1.Designer.cs 5KB
Students.Designer.cs 5KB
Students.cs 4KB
Resources.Designer.cs 3KB
Form1.cs 2KB
AddEp.cs 2KB
AssemblyInfo.cs 1KB
UpdateEp.cs 1KB
Settings.Designer.cs 1KB
Program.cs 525B
TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs 0B
TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs 0B
TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs 0B
StudentManage.csproj 7KB
MySqlConnector.dll 819KB
MySqlConnector.dll 819KB
MySqlConnector.dll 806KB
MySqlConnector.dll 806KB
MySqlConnector.dll 806KB
MySqlConnector.dll 803KB
MySqlConnector.dll 802KB
MySqlConnector.dll 802KB
MySqlConnector.dll 801KB
System.Diagnostics.DiagnosticSource.dll 169KB
System.Diagnostics.DiagnosticSource.dll 169KB
System.Numerics.Vectors.dll 160KB
System.Numerics.Vectors.dll 157KB
System.Numerics.Vectors.dll 157KB
System.Diagnostics.DiagnosticSource.dll 156KB
System.Diagnostics.DiagnosticSource.dll 147KB
System.Diagnostics.DiagnosticSource.dll 147KB
System.Memory.dll 139KB
System.Memory.dll 139KB
System.Memory.dll 139KB
System.Memory.dll 135KB
System.Numerics.Vectors.dll 113KB
System.Numerics.Vectors.dll 113KB
Microsoft.Extensions.Logging.Generators.dll 84KB
Microsoft.Extensions.Logging.Generators.dll 68KB
Microsoft.Extensions.Logging.Generators.dll 66KB
Microsoft.Extensions.Logging.Abstractions.dll 65KB
Microsoft.Extensions.Logging.Abstractions.dll 65KB
Microsoft.Extensions.Logging.Abstractions.dll 65KB
Microsoft.Extensions.Logging.Abstractions.dll 63KB
Microsoft.Extensions.Logging.Abstractions.dll 62KB
System.Numerics.Vectors.dll 37KB
System.Numerics.Vectors.dll 37KB
System.Numerics.Vectors.dll 37KB
System.Numerics.Vectors.dll 29KB
共 283 条
- 1
- 2
- 3
资源评论
hqkainett
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 3层独栋别墅图纸编号D055-三层-26.00&20.50米- 施工图.dwg
- 三层别墅图纸编号D054-三层-17.70&15.00米-施工图.DWG
- 三层别墅图纸编号D053-三层-16.59&19.58米-施工图.dwg
- 三层别墅图纸编号D052-三层-13.40&17.77米- 施工图.dwg
- 某日温度曲线以及日负荷曲线数据
- 全新STC12C5A60S2单片机+LCD19264大屏万年历农历生肖节气节日显示+闹钟+温湿度+台灯.rar
- 流水灯(库函数)三个灯依次亮灭
- 3层独栋别墅图纸编号D051-三层-10.14&17.04米- 施工图.dwg
- 常用的MIME TYPE类型枚举类Enum整理 静态方法直接检索使用
- Python网络爬虫实际例子代码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功