Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net mvc5 3 38
.NET Error 7 42
crm development 2 39
Editing XSL files, 2 21
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
There is a huge demand for CodeIgniter among the PHP web developers due to its dynamic features and benefits these days. It is one of most popular and agile open source PHP framework for creating robust web applications in PHP web development field.…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

9 Experts available now in Live!

Get 1:1 Help Now