LINQ in Action roller

Adding an item to a table

I have a small example database with 3 related tables; Company, Currency and Country. The tables are related by foreigh keys so that a Company had a CountryId and CurrencyId. I have created a default Linq to SQL definition (in beta 1) and I can iterate through the existing data easily with a foreach() loop. However, if I add an item to the existing Companies collection before the iteration the Currency property of the Company object is null. If I however dispose the DataContext and reopen it the Read More...
Published Monday, April 23, 2007 9:14 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication