MicroCloud.EntityFrameworkCore.SqlServer 8.0.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package MicroCloud.EntityFrameworkCore.SqlServer --version 8.0.0.5
NuGet\Install-Package MicroCloud.EntityFrameworkCore.SqlServer -Version 8.0.0.5
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.SqlServer" Version="8.0.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroCloud.EntityFrameworkCore.SqlServer --version 8.0.0.5
#r "nuget: MicroCloud.EntityFrameworkCore.SqlServer, 8.0.0.5"
#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.SqlServer as a Cake Addin
#addin nuget:?package=MicroCloud.EntityFrameworkCore.SqlServer&version=8.0.0.5

// Install MicroCloud.EntityFrameworkCore.SqlServer as a Cake Tool
#tool nuget:?package=MicroCloud.EntityFrameworkCore.SqlServer&version=8.0.0.5

MicroCloud SqlServer 数据库组件

Member project of MicroCloud Team NuGet Badge GitHub license

说明

  1. MicroCloud SqlServer 数据库组件,封装基于 Microsoft.EntityFrameworkCore.SqlServer 的数据访问功能的实现。
  2. 支持 SQL Server 2012 以上版本。

用法

可按照如下配置方式使用:

  1. 通过nuget引用 MicroCloud.EntityFrameworkCore.SqlServer 程序集
Install-Package MicroCloud.EntityFrameworkCore.SqlServer
  1. appsettings.json 中的 MicroCloud 节点下添加如下配置节点
{
    //数据库上下文集合
    "DbContexts": {
      //默认数据库上下文
      "DefaultDbContext": {
        "DbContextTypeName": "MicroCloud.Entity.DefaultDbContext,MicroCloud.EntityFrameworkCore", //上下文类型全名(默认数据库上下文)
        "DatabaseType": "SqlServer", //数据库类型:"Cosmos"(Azure Cosmos DB 的 SQL API)、"Kdbndp"(人大金仓)、"MySql"、"Oracle"、"PostgreSql"、"Sqlite"、"SqlServer"
        "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=MicroCloud_DEV;User ID=sa;Password=XXX;Pooling=true;Min Pool Size=1;Max Pool Size=60;Connect Timeout=60;Application Name=MicroCloud;TrustServerCertificate=true;", //连接字符串(SqlServer)
        //从数据库配置
        "SlaveDatabase": {
          "SlaveSelector": "Weight", //从数据库选择策略:Weight(平滑权重)、Random(随机)、Sequence(顺序轮询)
          //从数据库集合
          "SlaveDatabases": [
            {
              "Name": "MicroCloud_DEV_Slave01", //数据库名
              "Weight": 2, //权重(1-100)
              "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=MicroCloud_DEV.Slave01;User ID=sa;Password=XXX;Pooling=true;Min Pool Size=1;Max Pool Size=60;Connect Timeout=60;Application Name=MicroCloud;TrustServerCertificate=true;", //连接字符串(SqlServer)
            },
            {
              "Name": "MicroCloud_DEV_Slave02", //数据库名
              "Weight": 5, //权重(1-100)
              "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=MicroCloud_DEV.Slave02;User ID=sa;Password=XXX;Pooling=true;Min Pool Size=1;Max Pool Size=60;Connect Timeout=60;Application Name=MicroCloud;TrustServerCertificate=true;", //连接字符串(SqlServer)
            }
          ]
        },
        "LazyLoadingProxiesEnabled": true, //是否启用延迟加载代理
        "DateTimeUtcFormatEnabled": false, //是否启用时间UTC格式
        "AuditEntityEnabled": true, //是否允许审计实体
        "MigrationAssemblyName": "MicroCloud.Svc.Web", //迁移的程序集名称(为空时默认"DesignTimeXXXDbContextFactory"所在程序集)
        "MigrationEnabled": true //启用自动迁移
      }
    },
}

交流

QQ WeChat
QQ群号:863605868 微信号:SeonHu
Product 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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on MicroCloud.EntityFrameworkCore.SqlServer:

Package Downloads
MicroCloud.EntityFrameworkCore.Relation

MicroCloud 一体化数据访问组件,封装基于 SqlServer、MySql、Oracle、PostgreSql、Sqlite 类型数据访问功能的实现。

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.0.9 39 5/1/2024
8.0.0.8 39 5/1/2024
8.0.0.7 47 4/30/2024
8.0.0.5 80 4/19/2024
8.0.0.4 76 4/18/2024
8.0.0.3 86 4/15/2024
8.0.0.2 75 4/12/2024
8.0.0.1 75 4/12/2024
7.2.0.8 77 4/12/2024
7.2.0.7 79 4/12/2024
7.2.0.6 75 4/12/2024
7.2.0.5 75 4/12/2024
7.2.0.4 77 4/11/2024
7.2.0.2 95 4/7/2024
7.2.0.1 316 10/26/2023
7.1.2.9 135 11/7/2023
7.1.2.8 147 10/19/2023
7.1.2.7 133 10/19/2023
7.1.2.6 139 10/18/2023
7.1.2.5 159 9/20/2023
7.1.2.4 160 9/13/2023
7.1.2.3 163 9/13/2023
7.1.2.2 163 9/12/2023
7.1.2.1 171 9/4/2023
7.1.1.9 193 8/31/2023
7.1.1.6 169 8/29/2023
7.1.1.5 151 8/25/2023
7.1.1.4 134 8/25/2023
7.1.1.3 159 8/25/2023
7.1.1.2 148 8/24/2023
7.1.1.1 158 8/24/2023
7.0.3.1 156 8/24/2023
7.0.2.7 185 5/12/2023
7.0.2.6 148 5/11/2023
7.0.1.7 148 5/9/2023
7.0.1.6 156 5/9/2023
7.0.1.4 182 4/24/2023
7.0.1.3 193 4/19/2023
7.0.1.2 184 4/19/2023
7.0.1.1 188 4/19/2023
7.0.0.9 194 4/18/2023
7.0.0.8 193 4/17/2023
7.0.0.7 196 4/12/2023
7.0.0.6 198 4/8/2023
7.0.0.5 197 4/7/2023
7.0.0.4 189 4/7/2023
7.0.0.3 213 4/7/2023