Entity Framework Context Type - Unable to cast object type RRS feed

  • Question

  • Hi, I have been following the tutorial -> http://www.asp.net/web-forms/tutorials/getting-started-with-ef/the-entity-framework-and-aspnet-getting-started-part-2

    Stuck in the topic - Revising EntityDataSource Control Markup to Improve Performance. When I set ContextTypeName property by removing ConnectionString and DefaultContainerName, getting error message - Unable to cast object of type 'ContosoUniversity.DAL.SchoolEntities' to type 'System.Data.Objects.ObjectContext'.

    Please be noted that, using ConnectionString and DefaultContainerName was working fine.

    • Moved by Forrest Guo Monday, October 22, 2012 9:04 AM off-topic (From:.NET Framework Setup)
    Saturday, October 20, 2012 7:51 AM


All replies