Take the 2-minute tour ×

What is technical difference between SubmitChanges in Linq-to-SQL and SaveChanges in Entity Framework?

We know SubmitChanges is a concept for DataContext class while SaveChanges is a method of ObjectContext.

Are there any another differences?


share|improve this question
It's basically the same thing - just for two different libraries of code. From a functional standpoint: both will persist first determine all changes you have made to a set of data and then save those changes back to the persistant store (the database, typically). –  marc_s Jun 11 '12 at 13:06

1 Answer 1

up vote 13 down vote accepted

From MSDN:

SaveChanges operates within a transaction. SaveChanges will roll back that transaction and throw an exception if any of the dirty ObjectStateEntry objects cannot be persisted

SubmitChanges starts a transaction and will roll back if an exception occurs while SubmitChanges is executing. However, this does not roll back the changes in memory or tracked by the DataContext; those changes will need to be rolled back manually. You can start with a new instance of the DataContext if the changes in memory are to be discarded.

share|improve this answer

Your Answer


