Condividi tramite


Problems with the LINQ to Entities 101 samples in the March CTP

If you have downloaded the March CTP (and you have, haven't you?) you might have noticed that the LINQ to Entities samples were not functioning correctly right out of the gate. Unfortunately in the fast moving world of CTP development, sometimes the samples and the code get out of sync, and this was one of those times. However, it is not too difficult to get the samples back up and running. Simply follow these steps, and you should be golden.

 

1. Change MergeOption.NoCaching to MergeOption.NoTracking in the LinqtoEntitiesSamples.cs file

2. Remove ClientAutoGenerated="true" and StoreGenerated="true"  from the EntityNorthwind.csdl file (found in the LinqToEntities folder)

3. Either delete the bin folder, or delete all files in the output folder, as there are some files in it that causes problems.

4. If you get a "database already exists" exception, please add "User Instance=true" in the connection string in the LinqToEntitiesSamples.cs file.

 

Once you've performed these steps, you should be up and running! 

 

We will be updating the samples with these changes, and an announcement will be made at that time as to where to get the download, but in the meantime, this should work.

 

Please contact me if you are still having problems.

 

Thanks,

Erick Thompson

 

ADO.NET Program Manager

Comments

  • Anonymous
    March 09, 2007
    I've seen a good number of questions from people about the LINQ to Entities Samples in the Orcas March

  • Anonymous
    March 12, 2007
    Apparently there were a few glitches with the Linq samples in the Orcas March CTP. Erick has posted here