Esempio n. 1
0
 /// <summary>
 /// An error occurred during command execution
 /// </summary>
 public static StringTextWriter WriteError(this StringTextWriter writer, string errorMessage)
 {
     return(writer.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} {CommandLogging.Jj}: {errorMessage}"));
 }
Esempio n. 2
0
 /// <summary>
 /// Close the database connection
 /// </summary>
 internal static StringTextWriter WriteDd(this StringTextWriter writer, string name)
 {
     return(writer.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} {CommandLogging.Dd} ({name ?? "System.Data.IDbConnection"})"));
 }
Esempio n. 3
0
 /// <summary>
 /// Roll back the current database transaction
 /// </summary>
 internal static StringTextWriter WriteHh(this StringTextWriter writer)
 {
     return(writer.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} {CommandLogging.Hh}"));
 }
Esempio n. 4
0
 /// <summary>
 /// Excute T-SQL statement:
 /// </summary>
 internal static StringTextWriter WriteSql(this StringTextWriter writer, string sql)
 {
     return(writer.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} Execute T-SQL statement: {sql}"));
 }