I have a c# windows application running on .Net Framework 3.5 and am using Linq to entities to connect to a SQL Server 2008 Express db.
Initially I used seperate contexts for the creation and updates of each db object but I was receiving an error "System.InvalidOperationException: The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects". I am using a single ObjectContext for my single-threaded application and I have read that this recommended ussage as the creation of objectcontexts is expensive. Is this correct?
Now I have run into the issue that as I am using a single context, when I SaveChanges all my DB objects are updated. Is there a way to submit just the changes for a single object? Am I going about this the wrong way?