Example #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);
            }
        }
Example #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);
      }

    }