EF Core supports a lot of different providers and I can configure them in Startup.cs by specifying the provider. For example, if I want to use SQL Server, I can use:
services.AddDbContext<SomeContext>(options => {
options.UseSqlServer(Configuration.GetConnectionString("SomeDatabase"));
});
But the DB provider (SQL Server) seems to be hard-coded here. What I want to achieve is set the DB provider based on configuration so I can switch the DB provider based on configuration.
Is there a way to switch provider based on config?