1. 建立DataView
EnumerableRowCollection<DataRow> expr = from p in products.AsEnumerable() orderby p.Field<int>("SortOrder") select p; DataView view = expr.AsDataView();
2. DataView查詢
EnumerableRowCollection<DataRow> expr = from p in products.AsEnumerable() where p.Field<decimal>("UnitPrice") > 10m && p.Field<string>("ProductName").StartsWith("LINQ") select p; DataView view = expr.AsDataView();