I'm using the EventGridClient from the Microsoft.Azure.EventGrid NuGet package to publish events to an Azure Event Grid Topic.In my project i want to register the EventGridClient with the DI in IServiceCollection.
-
Usually the first place to interact with the Microsoft dependency injection container is in the Startup class of an ASP.NET Core application. Here, you use the ConfigureServices method to register services with the container. The ConfigureServices method is called early in the application hosting life cycle. It has a parameter, IServiceCollection, which is provided when the managed library initializes the ASP.NET Core application, refer to this post:stackoverflow.com/questions/65714541/…– TupacCommented Jul 5, 2021 at 6:48
-
@Chaodeng. Thanks for the reply but i already gone through this post and i am finding solution for .net core and above post solution working in .NET 5.0– DnyaneshSuryaCommented Jul 5, 2021 at 14:43
-
@Chodeng. I found the way and its working now.– DnyaneshSuryaCommented Jul 8, 2021 at 11:55
Add a comment
|