Top "Savechanges" questions

DbContext.

Check if an insert or update was successful in Entity Framework

In ADO.NET, ExecuteNonQuery() "For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by …

entity-framework savechanges
DbContext SaveChanges() - Detecting updated entities

I have overridden the SaveChanges() method in the Entity Framework 4.1 DbContext class. My override looks like this: public override int …

c# entity-framework savechanges dbcontext
Entity framework query on just added but not saved values

I'm using Entity Framework from a couple of years and I have a little problem now. I add an entity …

c# sql entity-framework savechanges
Entity framework doesn't save data entries in database

At first I should mention that this problem only occurs in windows forms applications and the same program in web …

.net visual-studio-2010 entity-framework-4 savechanges windows-applications
Saving in entity framework

I have read this article and still misunderstanding key moments. Don't we need call _context.SaveChanges() in every Delete/Update/... …

c# entity-framework savechanges
Can't SaveChanges with Entity Framework in ASP.Net MVC 3 project

Studying asp.net mvc 3 + EF code-first. I am new to both. My example is trivial, but I still can't make …

c# asp.net-mvc-3 entity-framework ef-code-first savechanges
Entity Framework 5 Using SaveChanges to add audit log

Seems straight forward override SaveChanges in EF to add an audit logger. See the ApplyAuditLogging method to set the audit …

c# asp.net-mvc entity-framework savechanges
EF4/WCF SaveChanges() Best Practice

This is how we implement a generic Save() service in WCF for our EF entities. A TT does the work …

wcf entity-framework self-tracking-entities savechanges
EntityFramework show entities before saving changes

Entity Framework ObjectSet with its method ToList shows just saved entities. That means, when I call context.AddToCustomers(myNewCust); and …

c# entity-framework savechanges