Use UseSqlServer in tests

This commit is contained in:
ajcvickers 2015-03-20 17:04:48 -07:00
parent 2209b2e933
commit 9b188a047d
2 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@ using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Diagnostics.Entity;
using Microsoft.AspNet.Identity;
using Microsoft.Data.Entity;
using Microsoft.Framework.Caching.Memory;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
@ -44,7 +45,8 @@ namespace MusicStore
{
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<MusicStoreContext>();
.AddDbContext<MusicStoreContext>(options =>
options.UseSqlServer(Configuration.Get("Data:DefaultConnection:ConnectionString")));
}
// Add Identity services to the services container

View File

@ -9,6 +9,7 @@ using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Diagnostics;
using Microsoft.AspNet.Diagnostics.Entity;
using Microsoft.AspNet.Identity;
using Microsoft.Data.Entity;
using Microsoft.Framework.Caching.Memory;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
@ -61,7 +62,8 @@ namespace MusicStore
{
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<MusicStoreContext>();
.AddDbContext<MusicStoreContext>(options =>
options.UseSqlServer(Configuration.Get("Data:DefaultConnection:ConnectionString")));
}
// Add Identity services to the services container