I am totally new to asp.net
I am running Visual Studio Express 2013.
I am using Visual Basic over C#
I created a new Dynamic Data Website.
I added an existing database (NORTHWND) by right clicking on App_Data and adding an existing item, then following the wizard.
I added new LINQ to SQL Class and followed the wizard, then dragged the tables from NORTHWND after double clicking on it.
I amended global.asax by uncommenting the line and changing the values to:
Code:
' The following registration should be used if YourDataContextType does not derive from DbContext
DefaultModel.RegisterContext(GetType(DataClassesDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True})
When opening Default.aspx in a browser I can see the page with all the tables. Success!
When I click on a table, there is an error:
Unable to cast object of type 'DataClassesDataContext' to type 'System.Data.Objects.ObjectContext'.
Help.
When trying to follow the instructions in the book and working through the Entity Data Model, I don't even get the first page with the tables listed on it.