Stop using context.Configuration.

This commit is contained in:
ajcvickers 2014-11-21 11:51:35 -08:00
parent 9f351a09a2
commit c84a6b436f
1 changed files with 3 additions and 3 deletions

View File

@ -14,10 +14,10 @@ namespace IdentitySample.Models
{ {
using (var db = serviceProvider.GetRequiredService<ApplicationDbContext>()) using (var db = serviceProvider.GetRequiredService<ApplicationDbContext>())
{ {
var sqlServerDataStore = db.Configuration.DataStore as SqlServerDataStore; var sqlServerDatabase = db.Database as SqlServerDatabase;
if (sqlServerDataStore != null) if (sqlServerDatabase != null)
{ {
if (await db.Database.EnsureCreatedAsync()) if (await sqlServerDatabase.EnsureCreatedAsync())
{ {
await CreateAdminUser(serviceProvider); await CreateAdminUser(serviceProvider);
} }