private static void Act(ParentEntity parentEntity, bool useGraphDiff) { using (var context = new SimpleContext()) { // force re-seed database every time context.Database.Initialize(true); if (useGraphDiff) { context.UpdateGraph(parentEntity); } context.SaveChanges(); } }