Authorised Territory code examples - This #dotnet 8 C# #tutorial shows how to use Dependency Injection with Windows Form application.
First, we create the project using the template Windows Forms App and install required nuget packages.
Next, test service is added and registered in Program.cs file.
Finally, the form is modified to accept the test service via DI and a button is added to display results of the test service call.