■LINQによるデータベースへの問い合わせ リスト1と同じ処理をLINQを使って記述すると次のようになります。実行結果はリスト1の場合とまったく同じです。 using System; using System.Linq; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { // NorthWindDataContextクラスはVS 2008により自動生成 NorthWindDataContext dc = new NorthWindDataContext(); // LINQによる問い合わせ var records = from n in dc.Orders where n.ShipCountry == "Norway" select n; // 問い合わせ結果の表示 forea
