随笔分类 -  MVC

MVC Filter使用
摘要:1、ActionFilterAttribute 使用示例 namespace Demo.Filter { public class ActionTestFilterAttribute : ActionFilterAttribute { public override void OnActionExe 阅读全文

posted @ 2017-05-12 17:43 月&&生 阅读(602) 评论(0) 推荐(0)

MVC设计及使用拓展
摘要:一、MVC HtmlHelper拓展示例 添加拓展类文件 public static class Html { public static Dictionary<int, string> TestExtensionHtml = new Dictionary<int, string>() { {1," 阅读全文

posted @ 2017-05-09 11:07 月&&生 阅读(192) 评论(0) 推荐(0)

EF常用查询写法
摘要:1、var list = from category in context.category join commodity in context.commodity on category.id equals commodity. categoryID where category.id>12 or 阅读全文

posted @ 2016-06-29 10:03 月&&生 阅读(742) 评论(0) 推荐(0)

EF 实践
摘要:一、CodeFirst 1、新建MVCEFManger(业务层)项目 在该项目下引入entityframework 安装包(用来生成数据库或者实体) PM> install-package entityframework(程序包管理器控制台enter) 2、新建MVCEF.Entity项目 添加相应 阅读全文

posted @ 2016-06-21 17:23 月&&生 阅读(213) 评论(0) 推荐(0)

MVC 日常所用
摘要:1、web.config中的runAllManagedModulesForAllRequests属性 runAllManagedModulesForAllRequests 在ASP.net中的web.config中,modules的这个属性比较重要。由于是在Global.ascx中,如想对每个Req 阅读全文

posted @ 2014-10-21 17:48 月&&生 阅读(162) 评论(0) 推荐(0)