예제 #1
0
 public void WriteLog(string message)
 {
     using (var conn = DatabaseLogger.CreateConnection())
     {
         using (var command = conn.CreateCommand())
         {
             command.CommandText = @"insert into log_thread (mensagem) values (@mensagem)";
             command.Parameters.Add(new SqlParameter("mensagem", message));
             command.ExecuteNonQuery();
         }
     }
 }
예제 #2
0
 public void Start()
 {
     using (var conn = DatabaseLogger.CreateConnection())
     {
         using (var command = conn.CreateCommand())
         {
             command.CommandText = @"insert into log_thread (mensagem) values (@mensagem)";
             command.Parameters.Add(new SqlParameter("mensagem", "Inicio do processo"));
             command.ExecuteNonQuery();
         }
     }
 }