Reputation: 36654
I'm using EF4 in my web application.
Currently, when I want to save a specific item, I change its properties, and then call SaveChanges()
.
But then all changes in the application are committed.
How can I commit changes of only specific item?
Upvotes: 2
Views: 205
Reputation: 11549
Create a new context and attach your specific item to this new context. Then call SaveChanges()
of the new context.
Upvotes: 3