Esempio n. 1
0
        static void ShowContentsOfSqlDatabaseTable()
        {
            Console.WriteLine("ID Timestamp                   Message");
            Console.WriteLine("== =========================== ========================");
            LogMessagesDataContext db     = new LogMessagesDataContext(connectionString);
            Table <Trace>          traces = db.GetTable <Trace>();

            foreach (var trace  in traces)
            {
                Console.WriteLine("{0}  {1}  {2}", trace.EventId, trace.Timestamp, trace.FormattedMessage);
            }
        }
Esempio n. 2
0
    static void ShowContentsOfSqlDatabaseTable()
    {

      Console.WriteLine("ID Timestamp                   Message");
      Console.WriteLine("== =========================== ========================");
      LogMessagesDataContext db = new LogMessagesDataContext(connectionString);
      Table<Trace> traces = db.GetTable<Trace>();
      foreach (var trace  in traces)
      {
        Console.WriteLine("{0}  {1}  {2}", trace.EventId, trace.Timestamp, trace.FormattedMessage);
      }

    }