|
@@ -45,9 +45,15 @@ namespace HyperCube
|
|
|
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
|
{
|
|
|
+ string connection;
|
|
|
+#if DEBUG
|
|
|
+ connection = "DevConnection";
|
|
|
+#else
|
|
|
+ connection = "ProdConnection";
|
|
|
+#endif
|
|
|
services.AddDbContext<ApplicationDbContext>(options =>
|
|
|
options.UseMySQL(
|
|
|
- Configuration.GetConnectionString("DefaultConnection")));
|
|
|
+ Configuration.GetConnectionString(connection)));
|
|
|
services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
|
|
|
.AddRoles<IdentityRole>()
|
|
|
.AddEntityFrameworkStores<ApplicationDbContext>();
|