Does Entity Framework's DbContext save changes if no changes were made?

.net, c#, dbcontext, entity-framework

Solution

It uses EntityState to determine that there is nothing to commit and so does not waste resources.

http://msdn.microsoft.com/en-us/library/system.data.entitystate%28v=vs.110%29.aspx

Problem

I could not find an answer on the Internet. Let's suppose I have a `DbContext`, and I just select all the entities from it. I don't add, update or delete any entity on the `DbSet`. If I call `SaveChanges` afterwards on the `DbSet`. Does it actually waste resources establishing a connection and other stuff even If I did not made any changes to the `DbSet`? Is it smart enough to detect if a change was made or not, and behave differently?

Original source