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" />
                    
Directory.Packages.props
<PackageReference Include="OpenRobot.Framework.Core" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=OpenRobot.Framework.Core&version=1.1.0
                    
Install as a Cake Tool

OpenRobot.Framework.Core

NuGet .NET

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 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.

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.

Version Downloads Last Updated
1.1.0 157 4/24/2026
1.0.1 148 4/21/2026