Is there a way to specify an "InMemory" database "connection string" (for lack of better terms) in the applicationsettings.json file?
I want to be able to use InMemory for development and then transform the connection for deployed (test, QA, prod) environments without having to change the code.
I recognize I can use a conditional statement to check and then go from there like -
var builder = new DbContextOptionsBuilder();
if(env.IsDevelopment())
{
builder.UseInMemoryDatabase("DevelopmentContext");
}
I was just curious if there is more of a convention or api based way. I have not been able to find anything.
"provider": "InMemory"or"provider": "SQLServer"and check for it (its conditionally too though). For SQLite check SQLite connection strings (second entry) - Tseng