LINQ in Action roller

How to use Attach() to update record?

Hi, testing the Attach method, I'm trying to update an existing record in my database that has a Topicid of 60. I'm not sure what I'm doing wrong to have the SubmitChanges work. There is no error but I'm also not seeing any changes to my record. DataClassesDataContext ctx = new DataClassesDataContext(); Topic newTopic = new Topic { TopicId = 60, TopicName = "Change tracking test updated " + System.DateTime.Now.ToString(), TopicTypeId = 1 }; ctx.Topics.Attach(newTopic); ctx.SubmitChanges(); Read More...
Published Monday, June 23, 2008 10:34 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication