Hi,
This seems to be a bug, we'll check it. Your ticket was refunded.
Hi,
This is not related to ABP but VisualStudio.
You can check the document: https://learn.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-7.0&tabs=visual-studio
Hi
Yes, it's recommended.
ABP also used INotifyCollectionChanged
https://github.com/abpframework/abp/blob/e6e91bf11cd219ccab72633b13994dc5be2d2932/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Layout/PageLayout.cs
Hi,
I think there is no problem, you can abstract some services if you need to. for example:
IDynamicMenuStore interfaceDynamicMenuStore to implement IDynamicMenuStore interfacepublic interface IDynamicMenuStore
{
Task<List<DynamicMenuItems>> GetMenuAsync();
}
public class DynamicMenuStore: IDynamicMenuStore, ITransientDependency
{
public Task<List<DynamicMenuItems>> GetMenuAsync()
{
....
}
}
public class MyMenuContributor : IMenuContributor
{
private readonly IDynamicMenuStore _dynamicMenuStore;
public MyMenuContributor(IDynamicMenuStore dynamicMenuStore)
{
_dynamicMenuStore = dynamicMenuStore;
}
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var dynamicMenus = await _dynamicMenuStore.GetMenuAsync();
//...
}
}
Hi,
You can consider using distributed cache to store the dynamic menus.
For example:
public class MyMenuContributor : IMenuContributor
{
private readonly IDistributedCache<DynamicMenusCacheItem> _menusCache;
public MyMenuContributor(IConfiguration configuration)
{
_configuration = configuration;
}
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var dynamicMenus = await _menusCache.GetOrAddAsync(
nameof(DynamicMenusCacheItem), //Cache key
async () => await GetFromRemoteAPI(),
() => new DistributedCacheEntryOptions
{
AbsoluteExpiration = DateTimeOffset.Now.AddHours(1)
}
);
//...
}
private Task<DynamicMenusCacheItem> GetFromRemoteAPI()
{
//...
}
}
public class DynamicMenusCacheItem
{
....
}
I think it should be working.
How I reproduce the problem? I will check it.
Is the Blazor server a tiered solution?
Hi,
The document move to doc.abp.io:
https://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict
Your ticket was refunded.
Hi,
I made some changes to the project and it works for me.
I have shared the project with you via email, you can check it
Steps
dotnet ef database update to create database. (for authserver and httpapihost)common pageCreate test button