Solved

Getting error in MVC  'system.data.entity.core.objectscontext' to type 'system.data.objects.objectcontext'

Posted on 2014-04-04
3
2,341 Views
Last Modified: 2014-04-28
Hi ,

I am new to MVC pattern . I am using Entity Framework 6.0 and getting error as

unable to retrive metadata. unable to cast object of type 'system.data.entity.core.objectscontext' to type 'system.data.objects.objectcontext'

While creating controller.
There is no error in compiling the application . Where do I need to look for error?

Please let me know if you need more info on this

public partial class Person
    {
        public Person()
        {
            this.Application_User = new HashSet<Application_User>();
            this.Student_Care = new HashSet<Student_Care>();
        }
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Person_ID { get; set; }
        public string Person_Type { get; set; }
        public string Status { get; set; }
        public string Initial_Name { get; set; }
        public string First_Name { get; set; }
        public string Last_Name { get; set; }
        public string Middle_Name { get; set; }

Open in new window

0
Comment
Question by:Vikash p
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 25

Expert Comment

by:apeter
ID: 39981842
Please show us the code there this casting problem(system.data.entity.core.objectscont) is coming ...looks like the problem with the object context
0
 

Accepted Solution

by:
Vikash p earned 0 total points
ID: 40018730
Upgread to MVC 6.0 and problem solved
0
 

Author Closing Comment

by:Vikash p
ID: 40026815
Just want to close Q and ask new question. Other answer not complete
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question