question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Injection of application service in NavigationProvider

See original GitHub issue

Description

I have injected an application service in my project’s navigation provider in order to generate dynamic data based menus. But I faced a problem that NavigationProvider doesn’t accept dependency injection to app service!

I need to access the app service function to get data from DB so I can show dynamic menu (fetched from DB). How can I do that?

Technical details:

  • Abp package version: 5.14.0
  • My base framework: .Net Core.
  • Exception message and stack trace if available:
Castle.MicroKernel.Handlers.HandlerException: 'Can't create component 'Abp.AutoMapper.AutoMapperObjectMapper' as it has dependencies to be satisfied.

image

  • Steps needed to reproduce the problem: Just add any dependency injection to any application service inside navigationprovider .

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
FirasKiracommented, Mar 16, 2022

@ismcagdas actually I got around it, I created another (secondary) Navigator.

0reactions
ismcagdascommented, Mar 16, 2022

@FirasKira did you find a way to do this ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Injection of application service in NavigationProvider
I have injected an application service in my project's navigation provider in order to generate dynamic data based menus.
Read more >
Registering Navigation Provider
Every web application has some kind of menu to navigate between pages/screens. ASP. ... Here's a navigation provider class to create such a...
Read more >
Articles Tutorials | AspNet Boilerplate
IUserNavigationManager can be injected and used to get menu items and show to the user. Thus, we can create menu in server side....
Read more >
Introduction to services and dependency injection
When Angular creates a new instance of a component class, it determines which services or other dependencies that component needs by looking at...
Read more >
Navigation options for SharePoint Online
This article describes navigation options sites with SharePoint Publishing enabled in SharePoint Online.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found