зеркало из https://github.com/aspnet/MusicStore.git
Update in-memory tests to used named database.
This commit is contained in:
Родитель
6833afe715
Коммит
9c676187f6
|
@ -45,7 +45,7 @@ namespace MusicStore
|
|||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
options.UseInMemoryDatabase("Scratch"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace MusicStore
|
|||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
options.UseInMemoryDatabase("Scratch"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace MusicStore
|
|||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
options.UseInMemoryDatabase("Scratch"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace MusicStore
|
|||
if (_platform.UseInMemoryStore)
|
||||
{
|
||||
services.AddDbContext<MusicStoreContext>(options =>
|
||||
options.UseInMemoryDatabase());
|
||||
options.UseInMemoryDatabase("Scratch"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace MusicStore.Components
|
|||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace MusicStore.Controllers
|
|||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace MusicStore.Components
|
|||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace MusicStore.Controllers
|
|||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace MusicStore.Controllers
|
|||
var services = new ServiceCollection();
|
||||
services.AddOptions();
|
||||
services
|
||||
.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
services.AddIdentity<ApplicationUser, IdentityRole>()
|
||||
.AddEntityFrameworkStores<MusicStoreContext>();
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace MusicStore.Test
|
|||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace MusicStore.Controllers
|
|||
var services = new ServiceCollection();
|
||||
services
|
||||
.AddSingleton<ObjectPoolProvider, DefaultObjectPoolProvider>()
|
||||
.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
services.AddMvc();
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace MusicStore.Controllers
|
|||
|
||||
var services = new ServiceCollection();
|
||||
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
|
||||
services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase("Scratch").UseInternalServiceProvider(efServiceProvider));
|
||||
|
||||
_serviceProvider = services.BuildServiceProvider();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче