MicroCloud.EntityFrameworkCore.MySql
8.0.3.1
dotnet add package MicroCloud.EntityFrameworkCore.MySql --version 8.0.3.1
NuGet\Install-Package MicroCloud.EntityFrameworkCore.MySql -Version 8.0.3.1
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="MicroCloud.EntityFrameworkCore.MySql" Version="8.0.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroCloud.EntityFrameworkCore.MySql --version 8.0.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroCloud.EntityFrameworkCore.MySql, 8.0.3.1"
#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 MicroCloud.EntityFrameworkCore.MySql as a Cake Addin #addin nuget:?package=MicroCloud.EntityFrameworkCore.MySql&version=8.0.3.1 // Install MicroCloud.EntityFrameworkCore.MySql as a Cake Tool #tool nuget:?package=MicroCloud.EntityFrameworkCore.MySql&version=8.0.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MicroCloud MySql 数据库组件
说明
- MicroCloud MySql 数据库组件,封装基于 Pomelo.EntityFrameworkCore.MySql 的数据访问功能的实现。
- 支持 MySQL、MariaDB。
用法
可按照如下配置方式使用:
- 通过nuget引用
MicroCloud.EntityFrameworkCore.MySql
程序集
Install-Package MicroCloud.EntityFrameworkCore.MySql
- 在
appsettings.json
中的MicroCloud
节点下添加如下配置节点
{
//数据库上下文集合
"DbContexts": {
//默认数据库上下文
"DefaultDbContext": {
"DbContextTypeName": "MicroCloud.Entity.DefaultDbContext,MicroCloud.EntityFrameworkCore", //上下文类型全名(默认数据库上下文)
"DatabaseType": "MySql", //数据库类型:"Cosmos"(Azure Cosmos DB 的 SQL API)、"Kdbndp"(人大金仓)、"MySql"、"Oracle"、"PostgreSql"、"Sqlite"、"SqlServer"
"ConnectionString": "server=localhost;port=3306;database=MicroCloud_DEV;uid=root;pwd=XXX;Allow User Variables=True", //连接字符串(MySql)
//从数据库配置
"SlaveDatabase": {
"SlaveSelector": "Weight", //从数据库选择策略:Weight(平滑权重)、Random(随机)、Sequence(顺序轮询)
//从数据库集合
"SlaveDatabases": [
{
"Name": "MicroCloud_DEV_Slave01", //数据库名
"Weight": 2, //权重(1-100)
"ConnectionString": "server=localhost;port=3306;database=MicroCloud_DEV.Slave01;uid=root;pwd=XXX;Allow User Variables=True", //连接字符串(MySql)
},
{
"Name": "MicroCloud_DEV_Slave02", //数据库名
"Weight": 5, //权重(1-100)
"ConnectionString": "server=localhost;port=3306;database=MicroCloud_DEV.Slave02;uid=root;pwd=XXX;Allow User Variables=True", //连接字符串(MySql)
}
]
},
"LazyLoadingProxiesEnabled": true, //是否启用延迟加载代理
"DateTimeUtcFormatEnabled": false, //是否启用时间UTC格式
"AuditEntityEnabled": true, //是否允许审计实体
"MigrationAssemblyName": "MicroCloud.Svc.Web", //迁移的程序集名称(为空时默认"DesignTimeXXXDbContextFactory"所在程序集)
"MigrationEnabled": true //启用自动迁移
}
},
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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.
-
net8.0
- MicroCloud.EntityFrameworkCore (>= 8.0.3.1)
- Pomelo.EntityFrameworkCore.MySql (>= 8.0.2)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on MicroCloud.EntityFrameworkCore.MySql:
Package | Downloads |
---|---|
MicroCloud.EntityFrameworkCore.Relation
MicroCloud 一体化数据访问组件,封装基于 SqlServer、MySql、Oracle、PostgreSql、Sqlite 类型数据访问功能的实现。 |
|
MicroCloud.EntityFrameworkCore.EntityConfiguration
MicroCloud 一体化数据访问组件,封装 MySql、Oracle、PostgreSql、Sqlite、SqlServer 等类型数据访问功能的实现。 |
|
MicroCloud.EntityFrameworkCore.Default
MicroCloud 一体化数据访问组件,封装 MySql、Oracle、PostgreSql、Sqlite、SqlServer 等类型数据访问功能的实现。 |
|
MicroCloud.EntityFrameworkCore.Relationals
MicroCloud 一体化数据访问组件,封装 MySql、Oracle、PostgreSql、Sqlite、SqlServer 等类型数据访问功能的实现。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.3.1 | 125 | 9/9/2024 |
8.0.2.9 | 117 | 9/5/2024 |
8.0.2.8 | 107 | 8/31/2024 |
8.0.2.7 | 107 | 8/31/2024 |
8.0.2.6 | 124 | 8/21/2024 |
8.0.2.5 | 137 | 8/21/2024 |
8.0.2.4 | 130 | 8/12/2024 |
8.0.2.3 | 129 | 8/8/2024 |
8.0.2.2 | 109 | 7/14/2024 |
8.0.2.1 | 100 | 6/7/2024 |
8.0.1.9 | 106 | 6/6/2024 |
8.0.1.8 | 92 | 6/6/2024 |
8.0.1.7 | 108 | 5/15/2024 |
8.0.1.6 | 95 | 5/15/2024 |
8.0.1.5 | 98 | 5/15/2024 |
8.0.1.4 | 95 | 5/14/2024 |
8.0.1.3 | 106 | 5/10/2024 |
8.0.1.2 | 119 | 5/8/2024 |
8.0.1.1 | 117 | 5/7/2024 |
8.0.0.9 | 104 | 5/1/2024 |
8.0.0.8 | 104 | 5/1/2024 |
8.0.0.7 | 114 | 4/30/2024 |
8.0.0.5 | 116 | 4/19/2024 |
8.0.0.4 | 121 | 4/18/2024 |
8.0.0.3 | 118 | 4/15/2024 |
8.0.0.2 | 118 | 4/12/2024 |
8.0.0.1 | 116 | 4/12/2024 |
7.2.0.8 | 116 | 4/12/2024 |
7.2.0.7 | 107 | 4/12/2024 |
7.2.0.6 | 111 | 4/12/2024 |
7.2.0.5 | 108 | 4/12/2024 |
7.2.0.4 | 115 | 4/11/2024 |
7.2.0.2 | 148 | 4/7/2024 |
7.2.0.1 | 315 | 10/26/2023 |
7.1.2.9 | 137 | 11/7/2023 |
7.1.2.8 | 163 | 10/19/2023 |
7.1.2.7 | 155 | 10/19/2023 |
7.1.2.6 | 145 | 10/18/2023 |
7.1.2.5 | 177 | 9/20/2023 |
7.1.2.4 | 169 | 9/13/2023 |
7.1.2.3 | 149 | 9/13/2023 |
7.1.2.2 | 171 | 9/12/2023 |
7.1.2.1 | 152 | 9/4/2023 |
7.1.1.9 | 174 | 8/31/2023 |
7.1.1.6 | 172 | 8/29/2023 |
7.1.1.5 | 162 | 8/25/2023 |
7.1.1.4 | 155 | 8/25/2023 |
7.1.1.3 | 154 | 8/25/2023 |
7.1.1.2 | 159 | 8/24/2023 |
7.1.1.1 | 150 | 8/24/2023 |
7.0.3.1 | 163 | 8/24/2023 |
7.0.2.6 | 164 | 5/11/2023 |
7.0.1.7 | 161 | 5/9/2023 |
7.0.1.6 | 157 | 5/9/2023 |
7.0.1.4 | 179 | 4/24/2023 |
7.0.1.3 | 195 | 4/19/2023 |
7.0.1.2 | 182 | 4/19/2023 |
7.0.1.1 | 105 | 4/19/2023 |
7.0.0.9 | 102 | 4/18/2023 |
7.0.0.8 | 103 | 4/17/2023 |
7.0.0.7 | 108 | 4/12/2023 |
7.0.0.6 | 104 | 4/8/2023 |
7.0.0.5 | 102 | 4/7/2023 |
7.0.0.4 | 101 | 4/7/2023 |
7.0.0.3 | 109 | 4/7/2023 |