public void FlushIdentityInserts() { if (QueuedIdentityInserts.IsEmpty()) { return; } if (SaveChangesTransactionally) { Context.BeginTransaction(); } String insertStatement = IdentityInsertColumnsPattern.FormatX(QueuedIdentityInserts.ToString(), TableName); _queuedIdentityInserts = null; Context.ExecuteScalar(insertStatement, new SqlParameter[] { }); }