|
|
@ -37,25 +37,6 @@ namespace MyCompanyName.MyProjectName |
|
|
|
|
|
|
|
|
private static void ConfigureExtraProperties() |
|
|
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
|
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
/* You can configure extra properties for the |
|
|
/* You can configure extra properties for the |
|
|
* entities defined in the modules used by your application. |
|
|
* entities defined in the modules used by your application. |
|
|
* |
|
|
* |
|
|
|