CyberEye.DataScope.Lib 3.0.34

dotnet add package CyberEye.DataScope.Lib --version 3.0.34
                    
NuGet\Install-Package CyberEye.DataScope.Lib -Version 3.0.34
                    
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="CyberEye.DataScope.Lib" Version="3.0.34" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CyberEye.DataScope.Lib" Version="3.0.34" />
                    
Directory.Packages.props
<PackageReference Include="CyberEye.DataScope.Lib" />
                    
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 CyberEye.DataScope.Lib --version 3.0.34
                    
#r "nuget: CyberEye.DataScope.Lib, 3.0.34"
                    
#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 CyberEye.DataScope.Lib@3.0.34
                    
#: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=CyberEye.DataScope.Lib&version=3.0.34
                    
Install as a Cake Addin
#tool nuget:?package=CyberEye.DataScope.Lib&version=3.0.34
                    
Install as a Cake Tool

CyberEye.DataScope.Lib

Hợp đồng và quy tắc phân vùng dữ liệu theo ứng dụng, tenant và đơn vị. Package độc lập với ASP.NET Core/storage; gateway ở các package dữ liệu thực thi quy tắc này.

Target framework: net8.0.

Cài đặt

dotnet add package CyberEye.DataScope.Lib

Cần cấu hình NuGet feed của dự án và chọn phiên bản tương thích với các package CyberEye khác trong host.

Khai báo entity

using Ce.DataScope.Lib;

[DataScopePolicy(DataScopeKind.Tenant)]
public class Document : IDataScopedEntity
{
    public int Id { get; set; }
    public DataScopeKind DataScopeKind { get; set; }
    public string ApplicationCode { get; set; }
    public int? TenantId { get; set; }
    public int? OrganId { get; set; }
}

Đây là fragment khai báo hợp đồng, chưa tạo cơ chế phân quyền. Host phải cung cấp context/authorizer và dùng scoped gateway của EF/Dapper/MongoDB/Elasticsearch.

Quy tắc tích hợp

  • Không lấy ApplicationCode/TenantId/OrganId tùy ý từ payload để xác định quyền.
  • Nếu cần ghi nguồn dữ liệu System, dùng hợp đồng ISourceSystemStampedEntity riêng.
  • DataScopePolicy là attribute trên entity, không phải [DataScope] filter trên controller.
  • Bypass cần authorizer và audit sink; không dùng như cách bỏ qua lỗi phân quyền.
  • Kiểm thử cách ly giữa ứng dụng/tenant với cả luồng đọc và ghi.
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.
  • net8.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on CyberEye.DataScope.Lib:

Package Downloads
CyberEye.Common.Lib

Package chứa các hàm tiện ích, các base class, abstract class

CyberEye.Infrastructure.Dto

Package chứa các Dto của những Service Core

CyberEye.Orm.Lib

Package cung cấp CRUD tương tác với các CSDL quan hệ

CyberEye.MongoDb.Lib

Package cung cấp CRUD tương tác với NoSql MongoDb

CyberEye.Elasticsearch.Lib

Package cung cấp CRUD tương tác với NoSql Elasticsearch

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.34 0 11/15/2026
3.0.33 0 11/15/2026
3.0.32 0 11/15/2026
3.0.31 55 11/15/2026
3.0.30 61 11/15/2026
3.0.29 73 11/13/2026
3.0.28 338 11/6/2026
3.0.27 198 9/17/2026