示例#1
0
 /// <summary>
 /// Removes all rows form the given table
 /// </summary>
 public static void DeleteAll(this MantisDatabase db, string what, MantisTable table)
 {
     using (var cmd = db.CreateCommand())
     {
         cmd.CommandText = $"DELETE FROM {db.Table(table)}";
         int count = cmd.ExecuteNonQuery();
         LogService.Info($"Deleted {count} {what}");
     }
 }
 public string Table(MantisTable table)
 {
     return(Options.TablePrefix + table.ToString() + "_table");
 }