0

I have a Blazor application that I am using. The dependency injection works well in the components/pages. But how can I access a dependency from one of my API Controllers?

billsecond
  • 612
  • 3
  • 21
  • 50

1 Answers1

1

As your controllers are already injected you only need add a constructor with parameters. The parameters will be injected assuming they are provided.

Brian Parker
  • 11,946
  • 2
  • 31
  • 41