与mdf文件有关

时间:2011-10-23 08:49:33

标签: asp.net linq-to-sql

我在Linq to Sql教程中找到了以下代码,Northwnd类来自哪里?是自动生成的

Northwnd db = new Northwnd(@"c:\northwnd.mdf");

// Query for customers in London.
IQueryable<Customer> custQuery =
    from cust in db.Customers
    where cust.City == "London"
    select cust;

1 个答案:

答案 0 :(得分:0)

通过向项目中添加新的Linq to Sql元素,在Visual Studio中使用向导生成它。我会推荐你​​following blog post。并another one