I have a situation where I want to perform the same actions in two different pages, to avoid code duplication, I created a Utilities class with a method that does what I want the two pages to do.
My question is why does injecting the services not work?
I have to pass the services into the method to get things to work...
If you have a constructor that requires you pass in the service you are wanting to be available, what is the point?
I need my regular class named Utilities to have the sql_databaseService available for use without having to pass it in (constructor injection).
I have a separate project Console app that calls my Utilities class in my Radzen Blazor Server app. I don't have the sql_databaseService available in the Console app, so I can't pass it to the Utilities class.