随笔分类 -  MVC

摘要:Model compatibility cannot be checked because the EdmMetadata type was not included in the model. Ensure that Include Metadata Convention has been added to the DbModelBuilder conventions.碰到此错误是由于使用了Code First来生成数据库,生成数据库之后修改了模型。只需要在Global.asax.cs的Application_Start()方法中将Database.SetInitializer<DbC 阅读全文
posted @ 2013-06-21 10:13 曉軒 阅读(214) 评论(0) 推荐(0)
摘要:一 Html.ActionLink("linkText","actionName")该重载的第一个参数是该链接要显示的文字,第二个参数是对应的控制器的方法,默认控制器为当前页面的控制器,如果当前页面的控制器为Products,则 Html.ActionLink("detail","Detail")则会生成 <a href="/Products/Detail">all</a>二 Html.ActionLink("linkText","actio 阅读全文
posted @ 2013-05-31 10:44 曉軒 阅读(219) 评论(0) 推荐(0)