Can't navigate to tables after setting scaffolding to true. Receive error. Please help. RRS feed

  • Question

  • User840026091 posted

    Receive this error no matter what I try. The type is whatever table/entity I try to navigate to. I am using MS SQL Server 2008 on local machine. I initially thought it was due to code first and DbContext. The RegisterRoutes wouldn't work with DbContext so I got this solved from the forums. I then could not navigate from Default page to any of the tables listed, so I tried using test table from AdventureWorks and still nothing. I next tried using EF 4.0 structure with ObjectContext and it works. I'm lost. I have read forum after forum and tried many things. What am I missing or doing wrong? How do I reach the underlying tables/entities from default links?

    Type '.Product' could not be found. Make sure that the required schemas are loaded and that the namespaces are imported correctly. Near type name, line 1, column 54.

    Seemed to have solved my own problem. Works if I set up as Web Application instead of Web Site. Have only tried one test site so far.

    Tuesday, April 3, 2012 12:55 PM

All replies

  • User-612389357 posted

    Try wrapping your Product entity with the website namespace..  You will have to import the namespace in your dbcontext class but it will work..

    Tuesday, October 16, 2012 5:17 PM