随笔分类 -  MVC

摘要:ASP.NET MVC的Model元数据与Model模板:预定义模板通过ModelMetadata表示的Model元数据的一个主要的作用在于为定 义在HtmlHelper和HtmlHelper中的模板方法(这些模板方法包括Display/DisplayFor、 Editor/EditorFor、Di... 阅读全文
posted @ 2015-12-09 17:57 zero530 阅读(220) 评论(0) 推荐(0)
摘要:@Html.EditorFor(model => model.RecommenderName, new { htmlAttributes = new { @class = "form-control" ,disabled="disabled"} }) 阅读全文
posted @ 2015-12-09 17:29 zero530 阅读(408) 评论(0) 推荐(0)
摘要:问题:entitytype has no key definedSolution:增加引用增加关键字[Key] using System.ComponentModel.DataAnnotations;[global::System.Data.Linq.Mapping.ColumnAttribute... 阅读全文
posted @ 2015-08-05 09:34 zero530 阅读(1340) 评论(0) 推荐(0)
摘要:问题:The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)解决方案:引用EntityFramework.dll 即... 阅读全文
posted @ 2015-08-05 09:28 zero530 阅读(659) 评论(1) 推荐(1)