Browse Source
Update MyProjectNameModuleExtensionConfigurator.cs
pull/14129/head
Enis Necipoglu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
0 additions and
20 deletions
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameModuleExtensionConfigurator.cs
|
|
|
@ -37,26 +37,6 @@ public static class MyProjectNameModuleExtensionConfigurator |
|
|
|
|
|
|
|
private static void ConfigureExtraProperties() |
|
|
|
{ |
|
|
|
ObjectExtensionManager.Instance.Modules() |
|
|
|
.ConfigureIdentity(identity => |
|
|
|
{ |
|
|
|
identity.ConfigureUser(user => |
|
|
|
{ |
|
|
|
user.AddOrUpdateProperty<string>( //property type: string
|
|
|
|
"SocialSecurityNumber", //property name
|
|
|
|
property => |
|
|
|
{ |
|
|
|
//validation rules
|
|
|
|
property.Attributes.Add(new RequiredAttribute()); |
|
|
|
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4}); |
|
|
|
|
|
|
|
//...other configurations for this property
|
|
|
|
// property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
|
|
|
|
} |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
/* You can configure extra properties for the |
|
|
|
* entities defined in the modules used by your application. |
|
|
|
* |
|
|
|
|