Hello,
I want to work with mysql on my local computer and ms sql-server on production server.
Here is what i've tried to do in Startup.cs:
I Have two methods:
public void ConfigureServices(IServiceCollection services)
{
...
}
and
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
}
Unfortunately, i have to put one of this lines in ConfigureServices method:
services.AddDbContext<DbContext>(options => options.UseMySQL("..."));
or
services.AddDbContext<pluginwebContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
But ConfigureServices does not provide env parameter so i cannot test with:
if (env.IsDevelopment())