Open Closed

How to get list of a entity in the MenuContributor : IMenuContributor { #7715


User avatar
0
Fabio.Zinesi created
  • ABP Framework version: v8.2.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server),
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hi.

I have an Entity named "Menus" with the additional menus to add to the main menu.

I need to the get the list of the elements of an entity inside the navigation\xxxxMenuContributor class.

What I have to do to access the GetListAsync(Filter)?


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can get services from context(MenuConfigurationContext)

    var myService = context.ServiceProvider.GetRequiredService<IMYService>();

    Then use the services to get your entity.

  • User Avatar
    0
    Fabio.Zinesi created

    IT Works. Thanks.

    I have a related question.

    I have a project angular front end + asp.net backend.

    If i add a blazor solution i cannot see the menu. The login is OK, but the menu is empty.

    Angular is OK

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you create a new question and share the logs of the Blazor and API websites? Thanks

Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13