我想在ASP.Net MVC 3(剃刀視圖)的視圖頁中使用實體框架對象,我很確定我以前做過這個。然而,無論出於何種原因,我不能讓它在這個項目上工作:在ASP.Net中使用實體模型對象MVC視圖頁
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Source Error:
Line 1: @model Data.Post
即在項目中引用(我可以操縱控制器中的數據),但我不能讓它在工作風景。