AddOptions, which is apparently not brought in my memory cache anymore.
This commit is contained in:
parent
dc34c630b7
commit
6116f0e2e8
|
|
@ -47,6 +47,7 @@ namespace MusicStore
|
||||||
// Add EF services to the services container
|
// Add EF services to the services container
|
||||||
if (useInMemoryStore)
|
if (useInMemoryStore)
|
||||||
{
|
{
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ namespace MusicStore
|
||||||
// Add EF services to the services container
|
// Add EF services to the services container
|
||||||
if (useInMemoryStore)
|
if (useInMemoryStore)
|
||||||
{
|
{
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ namespace MusicStore
|
||||||
// Add EF services to the services container
|
// Add EF services to the services container
|
||||||
if (useInMemoryStore)
|
if (useInMemoryStore)
|
||||||
{
|
{
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ namespace MusicStore
|
||||||
// Add EF services to the services container
|
// Add EF services to the services container
|
||||||
if (useInMemoryStore)
|
if (useInMemoryStore)
|
||||||
{
|
{
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ namespace MusicStore.Components
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ namespace MusicStore.Controllers
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ namespace MusicStore.Components
|
||||||
public GenreMenuComponentTest()
|
public GenreMenuComponentTest()
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ namespace MusicStore.Controllers
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ namespace MusicStore.Controllers
|
||||||
public ManageControllerTest()
|
public ManageControllerTest()
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
@ -32,6 +33,7 @@ namespace MusicStore.Controllers
|
||||||
.AddEntityFrameworkStores<MusicStoreContext>();
|
.AddEntityFrameworkStores<MusicStoreContext>();
|
||||||
|
|
||||||
services.AddLogging();
|
services.AddLogging();
|
||||||
|
services.AddOptions();
|
||||||
|
|
||||||
// IHttpContextAccessor is required for SignInManager, and UserManager
|
// IHttpContextAccessor is required for SignInManager, and UserManager
|
||||||
var context = new DefaultHttpContext();
|
var context = new DefaultHttpContext();
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ namespace MusicStore.Test
|
||||||
public ShoppingCartFixture()
|
public ShoppingCartFixture()
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ namespace MusicStore.Controllers
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ namespace MusicStore.Controllers
|
||||||
{
|
{
|
||||||
var services = new ServiceCollection();
|
var services = new ServiceCollection();
|
||||||
|
|
||||||
|
services.AddOptions();
|
||||||
services
|
services
|
||||||
.AddEntityFrameworkInMemoryDatabase()
|
.AddEntityFrameworkInMemoryDatabase()
|
||||||
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
.AddDbContext<MusicStoreContext>((p, b) => b.UseInMemoryDatabase().UseInternalServiceProvider(p));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue