When configuring multiple services in ASP.Net core in a function, the example shows that it is under the namespace using Microsoft.Extensions.Configuration;
Is this because so that in the Program.cs
the builder.Services
object will have access to our custom made functions? If this is the case, then there is no way around not adding it to the Microsoft.Extensions.Configuration
namespace?
From the example code https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0#combining-service-collection, you can see that the builder.Services
has access to the AddConfig
and AddMyDependencyGroup
since it was added to the Microsoft namespace above.