IDDI again... (Remove call to WithServices)

Per latest changes to EF DI/config.
This commit is contained in:
ajcvickers 2014-04-23 13:51:15 -07:00
parent d827b9fff2
commit 1c3b2ccc31
2 changed files with 3 additions and 13 deletions

View File

@ -29,22 +29,14 @@ namespace Microsoft.AspNet.Identity.Entity
public IdentityContext(IServiceProvider serviceProvider)
: base(serviceProvider) { }
public IdentityContext()
: this(new ServiceCollection()
.AddEntityFramework(
//#if NET45
// s => s.AddSqlServer()
//#else
s => s.AddInMemoryStore()
//#endif
).BuildServiceProvider()) { }
public IdentityContext() { }
protected override void OnConfiguring(EntityConfigurationBuilder builder)
{
//#if NET45
// builder.SqlServerConnectionString(@"Server=(localdb)\v11.0;Database=IdentityDb;Trusted_Connection=True;");
//#else
builder.UseInMemoryStore(persist: true);
builder.UseInMemoryStore();
//#endif
}

View File

@ -209,9 +209,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test
protected override void OnConfiguring(EntityConfigurationBuilder builder)
{
builder
.WithServices(s => s.AddInMemoryStore())
.UseInMemoryStore(persist: true);
builder.UseInMemoryStore();
}
protected override void OnModelCreating(ModelBuilder builder)