How to setup DI in custom code with Azure Logic App?

Baskaran Samuel Ganesan 0 Reputation points
2024-11-22T03:02:34.7366667+00:00

https://stackoverflow.com/questions/78919971/use-dependency-injection-in-azure-logic-app-custom-code

only Logger is registered and ready to use.

This does not work for custom code with logic app

var host = new HostBuilder()
			.ConfigureFunctionsWorkerDefaults()
			.ConfigureServices((hostContext, services) =>
			{
				services.AddLogging();

                services.AddScoped<ISomeService, SomeService>();
                
			}).Build();
			
await host.RunAsync();
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,229 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.