EF Core Connection to Azure SQL with Managed Identity
问题 I am using EF Core to connect to a Azure SQL Database deployed to Azure App Services. I am using an access token (obtained via the Managed Identities) to connect to Azure SQL database. Here is how I am doing that: Startup.cs: public void ConfigureServices(IServiceCollection services) { //code ignored for simplicity services.AddDbContext<MyCustomDBContext>(); services.AddTransient<IDBAuthTokenService, AzureSqlAuthTokenService>(); } MyCustomDBContext.cs public partial class MyCustomDBContext :