- 0
- 0
- 约 13页
- 2016-12-21 发布于贵州
- 举报
微 软 新 技 术 LinQ 下午: IEnumerable、IEnumerableT Query Expression LinQ Query Keywords IEnumerableT Select Where Average Contain Count Distinct First Query Keywords IEnumerableT From:Specifies a data source and a range variable where:Filters source elements based on one or more Boolean expressions separated by logical and || operators Select:Specifies the type and shape that the elements in the returned sequence will have when the query is executed. Orderby:The orderby will cause the elements in the returned sequence to be sorted according to the default comparer for the type. LinQ to SQL 微软新技术实验室--西安 Problem 强类型, 智能化, 编译器, 调试器 (指令式) 映射, 连接, 分组, 查询 (声明式) Data as Objects Objects as Data ?2008 Microsoft Thinkbank What is LINQ? Unified programming model for any data type/source Collections Database Relational Data XML Files Extendable for anything else * ?2008 Microsoft Thinkbank LINQ enabled ADO.NET LINQ Architecture XML Objects Relational Data .NET Language-Integrated Query (LINQ) * ?2008 Microsoft Thinkbank LINQ To Objects Working with collections Any one that implements IEnumerableT using System.Linq System.Core.Dll assembly int[] arr = new int[] {3,6,2,7,4,8,4 }; var arr2 = arr.where(x=x4); foreach (var v in arr2) { Console.WriteLine(v.ToString()); } int[] arr = new int[] {3,6,2,7,4,8,4 }; var arr2 = from n in arr where n 6 select n; foreach (var v in arr2) { Console.WriteLine(v.ToString()); } LINQ To Objects 数组(普通数组、自定义类数组)int[],string[],Users[] //assign directly ListT泛型列表 //Add Item QueueT泛型队列 //Enqueue Item StackT泛型栈 //Push Item LINQ To DataSet IEnumerableDataRow result = from cat in ds.Tables[0].AsEnumerable() where cat.Fieldstring(user_pwd)!=123 select cat; foreach (var n in result) { this.textBox1.Text += n.Fieldstring(user_name); } LINQ To SQL The DataContext type Entity col
您可能关注的文档
- 高年级顺序.doc
- (ATI)系列显卡双屏幕配置说明.doc
- (全解析)全国计算机等级考试三级嵌入式题库第一套.docx
- (山东省)泰安市2010年初中学生学业考试英语试题.doc
- (免金币)如何用U盘安装XP系统(图).doc
- (C语言修正版(仅供参考).doc
- 0-3法学院本科生毕业论文word文档.doc
- .NET3.5新功能(重点LINQ).docx
- 01.Android开发环境搭建.ppt
- 03-概要设计说明书模板.doc
- 小区绿化施工协议书.docx
- 墙面施工协议书.docx
- 1 古诗二首(课件)--2025-2026学年统编版语文二年级下册.pptx
- (2026春新版)部编版八年级道德与法治下册《3.1《公民基本权利》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《4.3《依法履行义务》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.2《按劳分配为主体、多种分配方式并存》PPT课件.pptx
- (2026春新版)部编版八年级道德与法治下册《6.1《公有制为主体、多种所有制经济共同发展》PPT课件.pptx
- 初三教学管理交流发言稿.docx
- 小学生课外阅读总结.docx
- 餐饮门店夜经济运营的社会责任报告(夜间贡献)撰写流程试题库及答案.doc
原创力文档

文档评论(0)