Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-04-04
3
Medium Priority
?
2,413 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

670 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