DataContext Doesn't Exist in Dynamic Data Project?

Posted by davemackey on Stack Overflow See other posts from Stack Overflow or by davemackey
Published on 2010-05-28T22:05:43Z Indexed on 2010/05/28 22:12 UTC
Read the original article Hit count: 167

Filed under:
|
|
|

This is really annoying...and I know it is something extremely simple... 1. I create a new Dynamic Data project. 2. I add a LINQ-to-SQL class and drag and drop some tables onto the class. 3. I open the global.asax.vb and uncomment the line: DefaultModel.RegisterContext(GetType(YourDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True}) I remove YourDataContext and replace it with the DataContext from my LINQ-to-SQL class: DefaultModel.RegisterContext(GetType(NorthwindDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True}) I then try to debug/build/etc. and receive the following error: Type 'NorthwindDataContext' is not defined Why is it not defined? It seems like its not recognizing I created the DBML file.

© Stack Overflow or respective owner

Related posts about sql

Related posts about LINQ