I am trying to use EF6 with VS2015 CTP and ASP.NET MVC 6. it is not recognizing the below mentioned code in startup.cs which I added when I was using EF7.
public void ConfigureServices(IServiceCollection services)
{
services.AddEntityFramework(Configuration)
.AddSqlServer()
.AddDbContext<VNDBContext>(options => options.UseSqlServer(Configuration.Get("Data:VNDBContext:ConnectionString")));
services.AddMvc().Configure<MvcOptions>(options =>
{
var jsonFormatter = (JsonOutputFormatter)options.OutputFormatters
.Where(o => o.Instance.GetType() == typeof(JsonOutputFormatter)).First().Instance;
jsonFormatter.SerializerSettings.ReferenceLoopHandling =
ReferenceLoopHandling.Ignore;
});
services.AddSingleton<INodeService, NodeService>();
}
If I use EF7 it has other issues as it is not matured yet.
How can I set above mentioned setting while doing everything in MVC6 but with EF6?