How to properly manage and dispose SqlConnection with SqlCredential in EF Core using Dependency Injection?
I am working on an ASP.NET Core project where I am using SqlCredential
for database authentication, provided by a SqlCredentialProvider
which is designed as a singleton to ensure a single instance throughout the application. Here’s how I have set up the DI container and configured the services: