How do I inject a dependency in custom Azure data factory (ADF) actions?

I am creating a custom activity by implementing the IDotNetActivity interface.

Here are a few steps I follow in my custom activity:

  • Read a file from a blob container.
  • Do some conversion
  • Override the same file.

The project type is a class library in the asp.net core template. At the moment I am initializing all dependencies in my user activity class, but I want to use dependency injection to make it loosely coupled, testable and reuse some code I already wrote to read files from blob container, etc.

Has anyone implemented DI in a .NET core class library project with native DI capabilities for .NET Core? If yes, then please share some link so I can implement it in my project as well.

+3


source to share


1 answer


Currently, ADF custom activity only supports the .NET Framework class library.

In a side note regarding how to do DI in .net core, there is an example below



https://github.com/aspnet/Docs/tree/master/aspnetcore/fundamentals/dependency-injection/sample

0


source







All Articles