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(); } } }
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(); } } }