Stop passing IConfiguration to AddEntityFramework
This commit is contained in:
parent
7e3db8935e
commit
a76b6cac24
|
|
@ -33,13 +33,13 @@ namespace MusicStore
|
|||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddInMemoryStore()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace MusicStore
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
// Add EF services to the services container
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,13 +46,13 @@ namespace MusicStore
|
|||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddInMemoryStore()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ namespace MusicStore
|
|||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddInMemoryStore()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ namespace MusicStore
|
|||
// Add EF services to the services container
|
||||
if (useInMemoryStore)
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddInMemoryStore()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
else
|
||||
{
|
||||
services.AddEntityFramework(Configuration)
|
||||
services.AddEntityFramework()
|
||||
.AddSqlServer()
|
||||
.AddDbContext<MusicStoreContext>();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue