From 55f07fed0887195e3dec15a07e78dbefef4fc17e Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 8 Apr 2017 08:52:55 -0500 Subject: [PATCH] wire dbcontext to connection string --- api/FilterLists.API/Startup.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/FilterLists.API/Startup.cs b/api/FilterLists.API/Startup.cs index b3f01609d..ddebe63d4 100644 --- a/api/FilterLists.API/Startup.cs +++ b/api/FilterLists.API/Startup.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using MySQL.Data.EntityFrameworkCore; +using MySQL.Data.EntityFrameworkCore.Extensions; namespace FilterLists.API { @@ -30,7 +31,7 @@ public void ConfigureServices(IServiceCollection services) services.AddEntityFramework() .AddEntityFrameworkMySQL() .AddDbContext(options => - options.UseMySQL(ConnectionString)); + options.UseMySQL(Configuration.GetConnectionString("FilterListsConnection"))); services.AddMvc(); }