EF6 Type of context 'System.Data.Entity.Core.Objects.ObjectContext' is not supported

Viewed 13098

I have a new project created using Visual Studio 2013 with an ADO.NET Entity Data Model (EF6).

Now I have to use some Dynamic Data function (like access to MetaTable object), so I add this code:

MetaModel model = new MetaModel();
        model.RegisterContext(() =>
        {
            return ((System.Data.Entity.Infrastructure.IObjectContextAdapter)new KiwiJuiceEntities()).ObjectContext;
        }, new ContextConfiguration() { ScaffoldAllTables = true });

but I've got this error:

Type of context 'System.Data.Entity.Core.Objects.ObjectContext' is not supported

Note that the project have the reference updated to EF6 (system.data.entity.core)

3 Answers
Related