mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
wire dbcontext to connection string
This commit is contained in:
parent
9dde67011d
commit
55f07fed08
1 changed files with 2 additions and 1 deletions
|
|
@ -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<FilterListsContext>(options =>
|
||||
options.UseMySQL(ConnectionString));
|
||||
options.UseMySQL(Configuration.GetConnectionString("FilterListsConnection")));
|
||||
services.AddMvc();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue