Something to know to get DLINQ working

Published Wed, Sep 14 2005 9:58 PM

I had a little issue with running through the DLINQ sample on SQL Server 2005. The sample uses auto-attaching of databases, which didn't work on my box.

Solve this by attaching the database from "C:\Program Files\LINQ Preview\Data\northwnd.mdf" using the SQL Server Management Console and replace this line

DataContext db = new DataContext(
    @"C:\Program Files\LINQ Preview\Data\northwnd.mdf");

with this line

DataContext db = new DataContext(
    @"Data Source=localhost;Initial Catalog=Northwind;Integrated Security=True");