OpenRobot.Framework.EFCommon
2.0.0
dotnet add package OpenRobot.Framework.EFCommon --version 2.0.0
NuGet\Install-Package OpenRobot.Framework.EFCommon -Version 2.0.0
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="OpenRobot.Framework.EFCommon" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenRobot.Framework.EFCommon" Version="2.0.0" />
<PackageReference Include="OpenRobot.Framework.EFCommon" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenRobot.Framework.EFCommon --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OpenRobot.Framework.EFCommon, 2.0.0"
#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.
#:package OpenRobot.Framework.EFCommon@2.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenRobot.Framework.EFCommon&version=2.0.0
#tool nuget:?package=OpenRobot.Framework.EFCommon&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OpenRobot.Framework.EFCommon
OpenRobot.Framework.EFCommon 是 OpenRobot Web 框架的 Entity Framework Core 共享配置库,为框架提供统一的数据访问层配置和通用接口。
主要特性
- EF Core 集成 - 基于 Entity Framework Core 8.0.8 的数据访问层
- ABP 集成 - 与 ASP.NET Boilerplate v9.4.2 框架深度集成
- 统一配置接口 - 提供
IDbContextConfigurer等统一配置接口 - 数据库提供程序支持 - 支持 PostgreSQL、SQLite 等多种数据库
- 多数据库支持 - 支持多数据库配置和动态连接切换
安装
dotnet add package OpenRobot.Framework.EFCommon
或在 Visual Studio 的 NuGet 包管理器控制台中运行:
Install-Package OpenRobot.Framework.EFCommon
快速开始
定义数据库配置器
using Microsoft.EntityFrameworkCore;
using Abp.EntityFrameworkCore;
public class MyDbConfigurer : IDbContextConfigurer
{
public void Configure(ISetupDbContext setupContext)
{
setupContext.DbContextOptions.UseSqlServer(
setupContext.ConnectionString,
options => options.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery)
);
}
}
在模块中注册
using Abp.Modules;
using Abp.EntityFrameworkCore;
public class MyEntityFrameworkModule : AbpModule
{
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
}
}
依赖项
| 包名 | 版本 | 用途 |
|---|---|---|
| Abp | 9.4.2 | ASP.NET Boilerplate 框架 |
| Abp.EntityFrameworkCore | 9.4.2 | ABP 的 EF Core 集成 |
| Microsoft.EntityFrameworkCore | 8.0.8 | Entity Framework Core |
系统要求
- .NET 8.0 或更高版本
在框架中的位置
OpenRobot.Framework.EntityFrameworkCore
├── OpenRobot.Framework.EFCommon ✓
└── OpenRobot.Framework.Common ✓
└── OpenRobot.Framework.EFCommon ✓
相关模块
OpenRobot.Framework.Common- 公共组件库OpenRobot.Framework.EntityFrameworkCore- EF Core 数据访问抽象核心层OpenRobot.Framework.Core- 领域实体
许可证
本项目采用 MIT 许可证。
作者
OpenRobot
反馈与贡献
欢迎通过以下方式提供反馈:
- 提交 Issue
- 发起 Pull Request
- 联系维护者
| 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. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Abp (>= 9.4.2)
- Abp.EntityFrameworkCore (>= 9.4.2)
- Microsoft.EntityFrameworkCore (>= 8.0.8)
- OpenRobot.Framework.Common (>= 2.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OpenRobot.Framework.EFCommon:
| Package | Downloads |
|---|---|
|
OpenRobot.Framework.EntityFrameworkCore
OpenRobot.Framework.EntityFrameworkCore 是数据访问层,提供 Entity Framework Core 的实现、数据库迁移和仓储模式 |
|
|
OpenRobot.Framework.Web.Core
OpenRobot.Framework.Web.Core 是 Web 层核心组件,提供身份验证、授权、API 控制器和 Swagger 配置 |
GitHub repositories
This package is not used by any popular GitHub repositories.