0

I have three projects in my solution:

  1. Domain layer
  2. GUI
  3. MVC application

Now my Domain layer i have created a *.DBML (SQL to LINQ), and i want to reuse this class in my MVC application. The DBML Class has the namespace CatalogDb and the Domain layer has the namespace Catalog. This is not really a problem at the moment. In my view i have written following on the top:

@model CatalogDb.BookMedia

The autocompleter can also see this namespace and class without problems.

But when i run the project the view gives an error:

Compiler Error Message: CS0246: The type or namespace name 'CatalogDb' could not be found (are you missing a using directive or an assembly?).

Do i need to add the CatalogDb namespace manually in the MVC application project? I dont understand why i cant point it to the namespace which it suggests.

enter image description here enter image description here

EDIT:

I have Catalog in my references in MVC application.

4

1 回答 1

0

After some hours of struggle i ended up adding af seperate *.dbml file to my MVC application and it solved the problems. I assume the namespaces were the primary cause of problem.

于 2012-06-06T20:02:46.753 回答