OrangeCloud.Core
3.2.8.2
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 OrangeCloud.Core --version 3.2.8.2
NuGet\Install-Package OrangeCloud.Core -Version 3.2.8.2
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="OrangeCloud.Core" Version="3.2.8.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OrangeCloud.Core --version 3.2.8.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OrangeCloud.Core, 3.2.8.2"
#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 OrangeCloud.Core as a Cake Addin #addin nuget:?package=OrangeCloud.Core&version=3.2.8.2 // Install OrangeCloud.Core as a Cake Tool #tool nuget:?package=OrangeCloud.Core&version=3.2.8.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OrangeCloud.Core
OrangeCloud.Core 是一个基于 dapper 的 ORM
功能介绍
- 支持批量生成数据表实体类
运行:go.aspx
- 支持分表插入
ORM.Build<T>()
.Insert(model, true)
.SetSplitTable(new MSplitTableConfig { Type = ESplitTableType.DateTime, DateTimeConfig = "yyyyMM" })
.Execute();
- 支持读写分离
// 读库:
<add key="FSystemRead" value="server=192.168.1.101,192.168.1.102,192.168.1.103;database=FSystem;uid=sa;pwd=123456"/>
// 写库:
<add key="FSystemWrite" value="server=192.168.1.100;database=FSystem;uid=sa;pwd=123456"/>
- 支持 BulkCopy
// 数据类型:DataTable
ORM.Build<T>().BulkCopy(dataTable);
// 数据类型:List<T>
// 参数 2:指定插入的列
ORM.Build<T>().BulkCopy(listData, o => new { o.col1, o.col2 });
- 支持动态查询写法(根据参数自动拼接条件)
// 可访问菜单:按条件查询
https://www.107000.com/T-Doc/7
- 支持简便的分页查询
ORM.Build<T>()
.Get(it => it.Where(o => o.Mark > 0).OrderBy(o => o.CreateDate))
.ToPageList(1, 30);
- 支持简便的事务处理
using(var trans = ORM.TransMaster())
{
--插入数据并获得ID
var id = ORM.Insert(model, true);
--修改数据
ORM.Update(model);
--提交事务
trans.Complete();
}
如何使用
- 单独创建 Entity 层,在 Entity 层引用 OrangeCloud.Core.dll
- 配置项目 config 文件
{
"ConfigType": "Production",
"OrangeCloud.Core.DataTable.Type": "SqlServer", //数据库类型:(SqlServer;MySql;)
"OrangeCloud.Core.DatabaseKey.Prefix": "", //数据库Key前缀
"OrangeCloud.Core.DatabaseKey.Suffix": "", //数据库Key后缀
"OrangeCloud.Core.DatabaseConfig.Encryption": false, //数据库Config.Value是否加密 true,false
"OrangeCloud.Core.FillEntity": "OrangeCloud.CoreEntity,OrangeCloud.CoreEntity,FillEntity", //填充系统字段映射的实现类
"OrangeCloud.Core.IsDebug": false, //是否是调试(true=调试模式:忽略菜单权限, false=正式环境)
"OrangeCloud.Log.IsSave": false, //是否输出SQL语句
"OrangeCloud.Log.SavePath": "E:\\Log\\", //输出路径
"OrangeCloud.Cookie.Login": "OrangeCloudOMS", //单点登录Cookie Name
"OrangeCloud.Cache.ServerList": "127.0.0.1:10600", //分布式缓存服务器:OCache
"OrangeCloud.Redis.ServerList": "127.0.0.1:6379", //分布式缓存服务器:Redis
"OrangeCloud.Upload.ServerList": "127.0.0.1:10300", //分布式上传服务器
"OrangeCloud.Upload.FileUrl": "https://cdn.xxx.com/", //分布式文件查看地址
// 写库
"DBWrite": "server=127.0.0.1\\SQL2016,1433;database=DB;uid=sa;pwd=123456;",
// 读库
"DBRead": "server=127.0.0.1\\SQL2016,1433;database=DB;uid=sa;pwd=123456;"
}
作者
樊嵘
教程
https://www.107000.com/T-Doc/1
更新日志
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. |
.NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- AutoMapper (>= 9.0.0)
- Consul (>= 1.7.14.3)
- Dapper (>= 2.1.35)
- Dapr.AspNetCore (>= 1.9.0)
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc (>= 2.2.0)
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.2)
- Oracle.ManagedDataAccess.Core (>= 3.21.140)
- System.Data.SqlClient (>= 4.8.6)
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 |
---|---|---|
3.2.9.5 | 21 | 11/16/2024 |
3.2.9.3 | 104 | 9/24/2024 |
3.2.9.2 | 78 | 9/24/2024 |
3.2.9.1 | 82 | 9/24/2024 |
3.2.9 | 78 | 9/24/2024 |
3.2.8.9 | 78 | 9/24/2024 |
3.2.8.8 | 86 | 9/23/2024 |
3.2.8.7 | 75 | 9/23/2024 |
3.2.8.6 | 112 | 9/17/2024 |
3.2.8.5 | 62 | 8/3/2024 |
3.2.8.3 | 70 | 8/3/2024 |
3.2.8.2 | 62 | 7/29/2024 |
3.2.8.1 | 101 | 7/12/2024 |
3.2.8 | 95 | 7/4/2024 |
3.2.7.9 | 86 | 6/25/2024 |
3.2.7.8 | 76 | 6/25/2024 |
3.2.7.7 | 93 | 6/3/2024 |
3.2.7.6 | 77 | 6/2/2024 |
3.2.7.5 | 117 | 5/7/2024 |
3.2.7.3 | 111 | 4/29/2024 |
3.2.7.2 | 108 | 4/29/2024 |
3.2.7.1 | 101 | 3/25/2024 |
3.2.7 | 101 | 3/23/2024 |
3.2.6.9 | 136 | 1/30/2024 |
3.2.6.8 | 127 | 1/10/2024 |
3.2.6.7 | 171 | 12/7/2023 |
3.2.6.6 | 109 | 12/7/2023 |
3.2.6.5 | 143 | 12/3/2023 |
3.2.6.3 | 131 | 11/13/2023 |
3.2.6.2 | 106 | 11/8/2023 |
3.2.6.1 | 124 | 11/6/2023 |
3.2.6 | 130 | 11/5/2023 |
3.2.5.2 | 130 | 10/21/2023 |
3.2.5.1 | 175 | 8/16/2023 |
3.2.3.9 | 212 | 3/14/2023 |
3.2.3.8 | 352 | 11/22/2022 |
3.2.3.6 | 325 | 11/22/2022 |
3.2.3.5 | 318 | 11/22/2022 |
3.2.3.3 | 348 | 11/15/2022 |
3.2.3.2 | 371 | 11/9/2022 |
3.2.3.1 | 358 | 11/9/2022 |
3.2.3 | 353 | 11/9/2022 |
3.2.2.9 | 354 | 11/8/2022 |
3.2.2.8 | 360 | 11/8/2022 |
3.2.2.6 | 346 | 11/7/2022 |
3.2.2.5 | 378 | 11/3/2022 |
3.2.2.3 | 393 | 11/3/2022 |
3.2.2.2 | 368 | 11/3/2022 |
3.2.2.1 | 389 | 11/3/2022 |
3.2.2 | 370 | 11/3/2022 |
3.2.1.9 | 359 | 11/3/2022 |
3.2.1.8 | 360 | 11/3/2022 |
3.2.1.6 | 396 | 11/1/2022 |
3.2.1.5 | 406 | 10/28/2022 |
3.2.1.3 | 408 | 10/27/2022 |
3.2.1.2 | 419 | 10/27/2022 |
3.2.1.1 | 388 | 10/26/2022 |
3.2.1 | 410 | 10/26/2022 |
3.2.0.9 | 402 | 10/26/2022 |
3.2.0.8 | 405 | 10/24/2022 |
3.2.0.7 | 401 | 10/24/2022 |
3.2.0.6 | 428 | 10/24/2022 |
3.2.0.5 | 425 | 10/24/2022 |
3.2.0.3 | 439 | 10/21/2022 |
3.2.0.2 | 433 | 10/12/2022 |
3.2.0.1 | 434 | 10/11/2022 |
3.2.0 | 443 | 10/8/2022 |
3.1.1.1 | 482 | 9/21/2022 |
3.1.1 | 566 | 6/21/2022 |
3.1.0.8 | 708 | 1/21/2022 |
3.1.0.7 | 672 | 1/21/2022 |
3.1.0.6 | 696 | 1/18/2022 |
3.1.0.5 | 536 | 1/12/2022 |
3.1.0.3 | 673 | 7/28/2020 |
3.1.0.2 | 613 | 7/28/2020 |
3.1.0.1 | 714 | 2/26/2020 |
2.2.1.6 | 644 | 10/18/2019 |
2.2.1.5 | 579 | 10/18/2019 |
2.2.1.3 | 590 | 10/17/2019 |
2.2.1.2 | 723 | 12/26/2018 |
2.2.1.1 | 750 | 12/18/2018 |
2.2.1 | 980 | 4/18/2018 |
2.2.0.9 | 961 | 4/18/2018 |
2.2.0.8 | 1,100 | 2/7/2017 |
2.2.0.6 | 981 | 2/7/2017 |
2.2.0.3 | 1,011 | 12/22/2016 |
2.2.0.2 | 1,001 | 12/22/2016 |
2.2.0.1 | 1,084 | 11/23/2016 |
2.2.0 | 1,031 | 11/22/2016 |
2.1.0 | 1,003 | 11/14/2016 |
2.0.8.3 | 1,121 | 11/13/2016 |
2.0.8.2 | 1,020 | 9/28/2016 |
2.0.8.1 | 994 | 9/8/2016 |
2.0.7.10 | 994 | 9/7/2016 |
2.0.7.9 | 1,077 | 9/7/2016 |
2.0.7.8 | 978 | 9/7/2016 |
2.0.7.7 | 969 | 9/7/2016 |
2.0.7.6 | 977 | 9/2/2016 |
2.0.7.5 | 1,006 | 9/1/2016 |
2.0.7.3 | 1,006 | 8/31/2016 |
2.0.7.2 | 1,016 | 8/29/2016 |
2.0.7.1 | 1,003 | 8/29/2016 |
2.0.6.36 | 978 | 8/27/2016 |
2.0.6.32 | 981 | 8/27/2016 |
2.0.6.28 | 1,047 | 8/27/2016 |
2.0.6.26 | 1,031 | 8/27/2016 |
2.0.6.22 | 1,028 | 8/18/2016 |
2.0.6.20 | 976 | 8/18/2016 |
2.0.6.16 | 1,009 | 8/18/2016 |
2.0.6.13 | 984 | 8/18/2016 |
2.0.6.11 | 993 | 8/17/2016 |
2.0.6.9 | 1,012 | 7/7/2016 |
2.0.6.6 | 1,280 | 6/15/2016 |
2.0.6.5 | 989 | 6/7/2016 |
2.0.6.3 | 1,246 | 6/7/2016 |
2.0.6.2 | 994 | 6/7/2016 |
2.0.6 | 1,030 | 4/10/2016 |