Explore Courses Blog Tutorials Interview Questions
+1 vote
in Azure by (45.3k points)

I recently upgraded from Entities Framework 5 to Entities Framework 6 Alpha 2 and I am getting the following error:

Method not found: 'System.Data.Objects.ObjectContext System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()'.

This is getting hit when I call:

if (Membership.ValidateUser(model.UserName, model.Password)) {}

This used to work fine before not sure why it's springing this error. Any suggestions?

1 Answer

+1 vote
by (16.8k points)

Try to update the below mentioned:

using System.Data.Objects; --> using System.Data.Entity.Core.Objects;

using System.Data.Objects.DataClasses; --> using System.Data.Entity.Core.Objects.DataClasses;

Browse Categories