OpenRobot.Framework.Core
1.1.0
dotnet add package OpenRobot.Framework.Core --version 1.1.0
NuGet\Install-Package OpenRobot.Framework.Core -Version 1.1.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.Core" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenRobot.Framework.Core" Version="1.1.0" />
<PackageReference Include="OpenRobot.Framework.Core" />
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.Core --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OpenRobot.Framework.Core, 1.1.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.Core@1.1.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.Core&version=1.1.0
#tool nuget:?package=OpenRobot.Framework.Core&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OpenRobot.Framework.Core
OpenRobot.Framework.Core 是 OpenRobot Web 框架的核心业务层,包含领域实体、业务逻辑、授权定义和本地化资源。
主要特性
- 领域实体 - 包含租户 (Tenant)、角色 (Role)、用户 (User) 等核心实体
- 业务逻辑 - 提供核心业务逻辑和领域服务
- 多租户支持 - 完整的多租户架构支持
- 授权管理 - 基于权限的授权系统
- 本地化 - 数据库驱动的多语言支持
- AutoMapper 集成 - 对象映射配置
安装
dotnet add package OpenRobot.Framework.Core
或在 Visual Studio 的 NuGet 包管理器控制台中运行:
Install-Package OpenRobot.Framework.Core
快速开始
定义实体
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
public class MyEntity : FullAuditedEntity<long>
{
public string Name { get; set; }
public string Description { get; set; }
}
定义权限
using Abp.Authorization;
public class MyAppAuthorizationProvider : AuthorizationProvider
{
public override void SetPermissions(IPermissionDefinitionContext context)
{
var administration = context.GetPermissionOrNull("Admin");
if (administration == null)
{
context.CreatePermission("Admin");
}
}
}
配置 AutoMapper
using AutoMapper;
public class MyProfile : Profile
{
public MyProfile()
{
CreateMap<MyEntity, MyDto>();
CreateMap<CreateMyDto, MyEntity>();
}
}
依赖项
| 包名 | 版本 | 用途 |
|---|---|---|
| Abp.AutoMapper | 9.4.2 | AutoMapper 集成 |
| Abp.ZeroCore.EntityFrameworkCore | 9.4.2 | ABP Zero Core 集成 |
| Castle.Windsor.MsDependencyInjection | 4.1.0 | 依赖注入 |
系统要求
- .NET 8.0 或更高版本
在框架中的位置
OpenRobot.Framework.Application
└── OpenRobot.Framework.Core ✓
OpenRobot.Framework.EntityFrameworkCore
└── OpenRobot.Framework.Core ✓
核心实体
核心身份实体
- Tenant - 多租户租户信息
- Role - 用户角色
- User - 系统用户
审计实体
框架提供以下审计基类:
CreationAuditedEntity- 创建审计AuditedEntity- 创建和修改审计FullAuditedEntity- 完整审计(包括软删除)PassivationAuditedEntity- 支持停用的审计
本地化
框架支持数据库驱动的本地化,本地化资源位于:
Localization/SourceFiles/*.xml
相关模块
OpenRobot.Framework.Common- 公共组件库OpenRobot.Framework.Application- 应用程序服务层OpenRobot.Framework.EntityFrameworkCore- 数据访问层
许可证
本项目采用 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.AutoMapper (>= 9.4.2)
- Abp.ZeroCore.EntityFrameworkCore (>= 9.4.2)
- Castle.Windsor.MsDependencyInjection (>= 4.1.0)
- OpenRobot.Framework.Common (>= 1.1.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OpenRobot.Framework.Core:
| Package | Downloads |
|---|---|
|
OpenRobot.Framework.Application
OpenRobot.Framework.Application 是应用程序服务层,包含 DTO、应用服务和 AutoMapper 配置 |
|
|
OpenRobot.Framework.EntityFrameworkCore
OpenRobot.Framework.EntityFrameworkCore 是数据访问层,提供 Entity Framework Core 的实现、数据库迁移和仓储模式 |
GitHub repositories
This package is not used by any popular GitHub repositories.