Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanMagnan/f012efc5f6ecd5d33f10104a7622f433 to your computer and use it in GitHub Desktop.
Save JonathanMagnan/f012efc5f6ecd5d33f10104a7622f433 to your computer and use it in GitHub Desktop.
EntityFrameworkManager.DefaultEntityFrameworkPropagationValue = false;
var ctx = new EntitiesContext();
ctx.Customers.AddRange(listToAdd);
ctx.Customers.RemoveRange(listToRemove);
listToModify.ForEach(x => x.DateModified = DateTime.Now);
// Easy to use
ctx.BulkSaveChanges(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment