这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
feijie d6c254fea6 feat(docs): 添加数据权限模块文档 1 year ago
..
LINGYUN/Abp/DataProtectionManagement/EntityFrameworkCore feat(data-protection): add a data permission management module. 2 years ago
FodyWeavers.xml feat(data-protection): add a data permission management module. 2 years ago
FodyWeavers.xsd feat(data-protection): add a data permission management module. 2 years ago
LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore.csproj upgrade abp framework to 8.2.0 1 year ago
README.EN.md feat(docs): 添加数据权限模块文档 1 year ago
README.md feat(docs): 添加数据权限模块文档 1 year ago

README.md

LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore

数据权限管理EntityFrameworkCore模块,提供数据权限管理的数据访问实现。

功能

  • 数据权限管理仓储实现
  • 数据库映射配置
  • 数据库迁移

仓储实现

  • EfCoreDataProtectionRepository - 数据权限仓储EF Core实现
    • 实现 IDataProtectionRepository 接口
    • 提供数据权限的CRUD操作
    • 支持数据过滤

数据库映射配置

public static class DataProtectionDbContextModelCreatingExtensions
{
    public static void ConfigureDataProtectionManagement(
        this ModelBuilder builder,
        Action<DataProtectionModelBuilderConfigurationOptions> optionsAction = null)
    {
        builder.Entity<DataProtection>(b =>
        {
            b.ToTable(options.TablePrefix + "DataProtections", options.Schema);

            b.ConfigureByConvention();

            b.Property(x => x.Name).IsRequired().HasMaxLength(DataProtectionConsts.MaxNameLength);
            b.Property(x => x.DisplayName).HasMaxLength(DataProtectionConsts.MaxDisplayNameLength);
            b.Property(x => x.Description).HasMaxLength(DataProtectionConsts.MaxDescriptionLength);

            b.HasIndex(x => x.Name);
        });
    }
}

配置使用

  1. 添加模块依赖
[DependsOn(typeof(AbpDataProtectionManagementEntityFrameworkCoreModule))]
public class YourModule : AbpModule
{
}
  1. 配置DbContext
public class YourDbContext : AbpDbContext<YourDbContext>, IDataProtectionManagementDbContext
{
    public DbSet<DataProtection> DataProtections { get; set; }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureDataProtectionManagement();
    }
}

相关链接