using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Collections.Generic;
using DAL;
public partial class LINQ_Summary2 : System.Web.UI.Page
{
NorthwindDataContext _ctx = new NorthwindDataContext();
string[] _ary = null;
protected void Page_Load( object sender, EventArgs e)
{
_ary = new string[] { "asp.net", "csharp", "xhtml", "css", "javascript", "wcf", "wpf",
"asp.net", "csharp", "xhtml", "css", "javascript",
"silverlight", "linq", "wf", "sqlserver", "asp.net ajax", "ssis", "ssas", "ssrs" };
// Distinct - 过滤集合中的相同项;延迟
Summary_Distinct();
// Union - 连接不同集合,自动过滤相同项;延迟
Summary_Union();
// Concat - 连接不同集合,不会自动过滤相同项;延迟
Summary_Concat();
// Intersect - 获取不同集合的相同项(交集);延迟
Summary_Intersect();
// Except - 从某集合中删除其与另一个集合中相同的项;延迟
Summary_Except();
// Skip - 跳过集合的前n个元素;延迟
// Take - 获取集合的前n个元素;延迟
Summary_Skip_Take();
// SkipWhile - 直到某一条件成立就停止跳过;延迟
// TakeWhile - 直到某一条件成立就停止获取;延迟
Summary_SkipWhile_TakeWhile();
// Single - 根据表达式返回集合中的某一元素;不延迟
// SingleOrDefault - 根据表达式返回集合中的某一元素(如果没有则返回默认值);不延迟
Summary_Single_SingleOrDefault();
// Reverse - 对集合反向排序;延迟
Summary_Reverse();
// SelectMany - Select选择(一对多);延迟
Summary_SelectMany();
}
}