http://www.atmarkit.co.jp/fdotnet/special/cslinq02/cslinq02_02.html
このページのコード13を、VS2010Expressで動かそうとしたら
「エラー 1 型または名前空間名 'NorthWindDataContext' が見つかりませんでした。using ディレクティブまたはアセンブリ参照が不足しています。 」
と出てしまいました。
VS2010Expressに対応させるには、どうしたらいいですか。
サンプルコード13
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;
// 問い合わせ結果の表示
foreach (var r in records)
{
Console.WriteLine("{0}, {1}, {2}, {3}",
r.OrderID, r.EmployeeID, r.OrderDate, r.ShipCountry);
}
Console.ReadLine();
}
}
}