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