Removing the InMemory store for EF data in CoreCLR.

This commit is contained in:
Praburaj 2014-05-12 08:37:55 -07:00
parent dcc55c97ba
commit 909941fa51
2 changed files with 1 additions and 8 deletions

View File

@ -1,7 +1,6 @@
using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.ConfigurationModel;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.InMemory;
using Microsoft.Data.Entity.SqlServer; using Microsoft.Data.Entity.SqlServer;
using System; using System;
@ -26,11 +25,7 @@ namespace MusicStore.Models
protected override void OnConfiguring(DbContextOptions builder) protected override void OnConfiguring(DbContextOptions builder)
{ {
#if NET45
builder.UseSqlServer(_configuration.Get("Data:DefaultConnection:ConnectionString")); builder.UseSqlServer(_configuration.Get("Data:DefaultConnection:ConnectionString"));
#else
builder.UseInMemoryStore(persist: true);
#endif
} }
protected override void OnModelCreating(ModelBuilder builder) protected override void OnModelCreating(ModelBuilder builder)

View File

@ -43,10 +43,8 @@ public class Startup
//Add all MVC related services to IoC. //Add all MVC related services to IoC.
services.AddMvc(); services.AddMvc();
/*Add all EF related services to IoC. /*Add all EF related services to IoC.*/
Using an InMemoryStore in K until SQL server is available.*/
services.AddEntityFramework().AddSqlServer(); services.AddEntityFramework().AddSqlServer();
services.AddEntityFramework().AddInMemoryStore();
services.AddTransient<MusicStoreContext>(); services.AddTransient<MusicStoreContext>();