2013年5月29日

ASP.NET MVC请求管道中的19个事件

摘要: 1.BeginRequest 开始处理请求2.AuthenticateRequest 授权验证请求,获取用户授权信息3.PostAuthenticateRequest 获取成功4.AunthorizeRequest 授权,一般来检查用户是否获得权限5.PostAuthorizeRequest 获得授权6.ResolveRequestCache 获取页面缓存结果(如果没有则执行)7.PostResolveRequestCache 已获取缓存8.PostMapRequestHandler 创建页面对象9.AcquireRequestState 获取Session -- 先判断当前页面对象是否实现了 阅读全文

posted @ 2013-05-29 17:11 六欲 阅读(946) 评论(0) 推荐(0)

Linq 条件查询的一些方法

摘要: 1.LINQ的IN: var queryResult = from p in db.Products where (new int?[] {1,2}).Contains(p.CategoryID) select p;2.LINQ的NOT IN: var queryResult = from p in db.Products where !(new int?[] { 1, 2 }).Contains(p.CategoryID) select p;3.LINQ的NOT IN 遍历集合List<string> source = new List<string>{ " 阅读全文

posted @ 2013-05-29 11:53 六欲 阅读(1888) 评论(0) 推荐(0)

导航