LINQ in Action roller

Entities and duplicate records ?

I am a little confused , here it is: Database: UserTable UserID (PK) AgeRangeID(FK) AgeTable AgeRangeID(PK) AgeRange (string) "18-24","24-35".... AgeTable is already populated and should not be changed. Code Snippet DataContext dc = new DataContext(); dc.GetAllAgeRanges(); // returns content of table AgeTable UserTable user = new UserTable(); user.AgeRange = dc[0]; // you would think that this just link the 2 dc.Users.Add(user); dc.SubmitChanges(); the above code, creates a new Read More...
Published Monday, May 21, 2007 7:10 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication