예제 #1
0
 public static void ResetAllSequences(string connectionString)
 {
     SqlExecutor.Execute(connectionString, sql);
 }
예제 #2
0
 /// <summary>
 /// Resets all sequence values in a database.  The
 /// method uses the INFORMATION_SCHEMA schema to
 /// identify all sequences.  These sequences are
 /// reset to 1 plus the maximum value of the
 /// column that uses the sequence's next value as
 /// a default.  Note: This method may fail if
 /// the same sequence is used for multiple tables.
 /// </summary>
 /// <param name="context">Valid db context</param>
 public static void ResetAllSequences(DbContext context)
 {
     SqlExecutor.Execute(context, sql);
 }