Solved

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

Posted on 2014-04-04
3
2,269 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
  • 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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Runtime Error 2 28
Wav problem 4 16
Video Player 2017 5 14
use of unassigned local variable 'id' 6 27
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now