更新abpuser并仅将Name列的长度从64更改为250

问题描述 投票:0回答:1

我正在尝试将“姓名”和“姓氏”列的长度从 64 更新为 250 当我在domain.shared层中打开ModuleExtensionConfigurator.cs时 我找到了这个方法

private static void ConfigureExistingProperties()
{
    /* You can change max lengths for properties of the
     * entities defined in the modules used by your application.
     *
     * Example: Change user and role name max lengths

       IdentityUserConsts.MaxNameLength = 99;
       IdentityRoleConsts.MaxNameLength = 99;

     * Notice: It is not suggested to change property lengths
     * unless you really need it. Go with the standard values wherever possible.
     *
     * If you are using EF Core, you will need to run the add-migration command after your changes.
     */
    IdentityUserConsts.MaxNameLength = 256;

}

在我进行此更改并添加迁移后,没有任何反应,并且生成了空迁移 我该如何解决这个问题?

c# asp.net-identity abp
1个回答
0
投票

在您的domain.shared中projectModuleExtensionConfigurator的ConfigureExistingProperties方法中添加以下代码

        AbpUserConsts.MaxNameLength = 250;

我希望这能解决你的问题

© www.soinside.com 2019 - 2024. All rights reserved.