ryudice
ryudice

Reputation: 37456

submit partial changes to datacontext

is there a way to insert an entity without using the SubmitChanges() function of the datacontext? I want to do this because I have other changes done on my datacontext which I do not want to submit yet, if I call the SubmitChanges function it will submit all changes including the ones I do not want to save yet.

Upvotes: 1

Views: 232

Answers (1)

Adeel
Adeel

Reputation: 19238

Either use the new DataContext instance as it is a light-weight OR Use the InsertOnSubmit method for those entities you want to add. Than calling the SubmitChanges only update desired entities.

Upvotes: 2

Related Questions