Hello Anjali. My problem is to check if it already exists and prevent it from being saved to the database. Can you provide a solution for me?
ObjectExtensionManager.Instance.Modules().ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>(UserConsts.LoanOfficer,
options =>
{
options.Attributes.Add(new RequiredAttribute());
options.Attributes.Add(new StringLengthAttribute(UserConsts.MaxLoanOfficerLength));
//options.UI.OnEditForm.IsVisible = false;
});
user.Validators.Add(context =>
{
//help check exist??
});
});
});
Hello Masum.ulu. I think this is an automated feature, I didn't have to customize it in the code.
Is there anyone who can help me fix this bug?
private static void ConfigureExtraProperties()
{
ObjectExtensionManager.Instance.Modules().ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>(UserConsts.LoanOfficer,
options =>
{
options.Attributes.Add(new RequiredAttribute());
options.Attributes.Add(new StringLengthAttribute(UserConsts.MaxLoanOfficerLength));
});
user.AddOrUpdateProperty<string>(UserConsts.BranchCode,
options =>
{
options.Attributes.Add(new RequiredAttribute());
options.Attributes.Add(new StringLengthAttribute(UserConsts.MaxBranchCodeLength));
});
});
});
}
The function is now running, thank you!