Steps to reproduce:
- Create a WebSite project in Visual Studio.
- Add a reference to System.Data.Entity
- Add a "Web Page Razor v3", with following content:
@using System.Data.Entity;
@{
var db = Database.Open("WebPagesMovies");
//var selectCommand = "SELECT * FROM Movies";
//var searchTerm = "";
}
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
My problem is, that the class Database is not recognized. The class is located in the system data entity namespace. If i do the same steps in a ASP .NET Web Application project, the reference is recognized. Because a website project has no csproj file, the references are placed in the web.config file. I see there following entry:
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Does anybody get what i am missing here? Why can I not reference that namespace?