HI,
You can implement it in the entityframeworkcore project
public class MyUserRepository : EfCoreRepository<IIdentityDbContext, IdentityUser, Guid> , IMyUserRepository
{
public MyUserRepository(IDbContextProvider<IIdentityDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public async Task<List<IdentityUser>> GetListAsync(.....)
{
return await (await GetDbSetAsync()).Where(x => EF.Property<int>(x, "PropertyAdded") == 1).ToListAsync();
}
}
Hi,
I can't reproduce this problem, could you share a project to reproduce? thanks. shiwei.liang@volosoft.com
Hi,
I think you need : https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.ef.property?view=efcore-5.0#examples
Hi,
Are you using Blazor UI, right?
Seems Blazor does not need signalr.js See: https://docs.microsoft.com/en-us/aspnet/core/tutorials/signalr-blazor?view=aspnetcore-5.0&tabs=visual-studio&pivots=server
Hi,
I make some changes to the project you provied.
When the main app is logged in, the FinRecon app will be redirected back to the index page after clicking login without entering credentials, this is the same with *.abp.io websites.
I have send it to your email.
Is it possible to change existing property visibility on the UI? We've followed the instructions in the ModuleExtensionConfigurator - configuring visibility of the new properties works but configuring existing (predefinied) properties doesn't. Example:
You need custom the UI, see https://docs.abp.io/en/abp/latest/UI/Blazor/Customization-Overriding-Components , I can send you the UI source code if you need.
Is it possible to set existing property as required. For example, we need "Surname" property to be required in database.
You can override the component and override the OnCreatingEntityAsync method
Example:
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(UserManagement))]
public class MyUserManagement : UserManagement
{
protected override Task OnCreatingEntityAsync()
{
if (NewEntity.Surname.IsNullOrWhiteSpace())
{
Message.Error("surname is required");
return Task.CompletedTask;
}
return base.OnCreatingEntityAsync();
}
}
How to set new property as required in database?
See https://docs.abp.io/en/abp/latest/Entity-Framework-Core#mapefcoreproperty, you can add a new field via Object Extension Manager
How to enable client side validation for the property? We've set required attribute with the following:
The extended UI does not support client-side validation.
Hi,
I can't reproduce the problem, can I check it remotely? shiwei.liang@volosoft.com
Hi,
Can you share your code? thanks.
Is it possible to remove existing property from identity module? For example, we don't need phone number property in our project, how can we remove it?
You can download the module source code to customize, but we do not recommend it.you can just ignore it
How to enable client side validation for the property? We've set required attribute with the following: property.Attributes.Add(new RequiredAttribute());
What UI are you using?
Hi,
Can you provide a project or steps to reproduce?