我想在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
即在项目中引用(我可以操纵控制器中的数据),但我不能让它在工作风景。