Aore.Db
1.0.0
dotnet add package Aore.Db --version 1.0.0
NuGet\Install-Package Aore.Db -Version 1.0.0
<PackageReference Include="Aore.Db" Version="1.0.0" />
<PackageVersion Include="Aore.Db" Version="1.0.0" />
<PackageReference Include="Aore.Db" />
paket add Aore.Db --version 1.0.0
#r "nuget: Aore.Db, 1.0.0"
#:package Aore.Db@1.0.0
#addin nuget:?package=Aore.Db&version=1.0.0
#tool nuget:?package=Aore.Db&version=1.0.0
Aore.Db — .NET SDK
📈 一个基于 .NET Standard 2.0 的通用工具库,提供了多种数据访问和实用功能的支持的开发组件,助力大量系统和应用取得成功。我将继续保持更新,并正在深度融合更多场景应用👐
使用 Aore.Db,您可以方便快速将现有项目或新项目实现操作数据支持。
目前 Aore.Db 支持 .NET Standard 2.0 等多种框架,同时兼容所有 MVC、Razor、WebApi、Console(命令行)、桌面应用(.exe)和后台服务等环境,和外部框架完全解耦。 适用于需要跨平台兼容性的应用程序开发。
希望有更多的人可以从中受益,理解并传播开源的精神,一同助力中国开源事业!感恩一路上给我们提供帮助的朋友们!
如果你喜欢并希望我们继续优化这个项目,请给我们一个 ★Star :)
✨ 功能特性
- 多数据库支持:提供了对多种数据库(MySQL、Oracle、PostgreSQL、SQLite、SQL Server、MDB)的访问支持
- 它不仅简化了数据库操作,还提高了代码的可维护性和可移植性,是开发高效、可靠数据库应用程序的理想选择
- ...
🚀 Aore.Db 使用示例 :开启你的改造开发之旅!
.NET CLI:
dotnet add package Aore.Db --version 1.0.0
或
Nuget包进行搜索下载
🛠 操作使用
通过 DbProviderFactory 和连接字符串初始化
public DbHelper(DbProviderFactory providerFactory, string connectionString);
数据库连接操作
// 创建连接
public DbConnection CreateConnection();
// 打开连接
public void OpenConnection(DbConnection conn);
// 关闭连接
public void CloseConnection(DbConnection connection);
// 创建事务
public DbTransaction CreateTransaction(DbConnection connection);
// ...
命令创建与执行
这些方法用于创建 SQL 命令,并提供了多种参数化查询的支持。
// 创建命令(无参数)
public DbCommand CreateCommand();
// 创建命令(带参数)
public DbCommand CreateCommand(string commandText, params object[] parameters);
// ...
数据读取与转换
这些方法用于从数据库中读取数据并将其转换为指定类型的数组(举例返回Array)。其中执行查询返回其它类型的方法还包括:
// ExceuteBatchWithBegin
// ExceuteBatchWithBeginParameter
// ExceuteDataSet
// ExceuteDataTabble
// ExceuteDictionary
// ExceuteList
// ExceuteNonQuery
// ExceuteScalar
// ExceuteObject
// ExceuteReader
// 执行命令并返回数组
public T[] ExecuteArray<T>(DbCommand command, Converter<object, T> converter, int startRecord, int maxRecords, DbConnection connection);
// 执行命令文本并返回数组
public T[] ExecuteArray<T>(string commandText, int startRecord, int maxRecords, DbConnection connection);
// 执行命令文本并返回数组(带自定义转换器
public T[] ExecuteArray<T>(string commandText, Converter<object, T> converter, int startRecord, int maxRecords, DbConnection connection);
// 执行命令文本并返回数组(带参数)
public T[] ExecuteArray<T>(string commandText, params object[] parameters);
// ...
✋ 贡献代码
如果需要使用或修改此项目的源代码,建议先Fork。也欢迎将您修改的通用版本Pull Request过来。
- Fork
- 创建您的特性分支 (
git checkout -b my-new-feature) - 提交您的改动 (
git commit -am 'Added some feature') - 将您的修改记录提交到远程
git仓库 (git push origin my-new-feature) - 然后到 github 网站的该
git远程仓库的my-new-feature分支下发起 Pull Request (请提交到Developer分支,不要直接提交到master分支)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. 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 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 190 | 7/27/2025 |
一个基于 .netstandard2.0 的通用DbHelper工具库,提供了多个数据访问和实用功能的支持