internal static List <JournalEntry> GetAllByTLU(long tluid, SQLiteConnectionUser cn) { TravelLogUnit tlu = TravelLogUnit.Get(tluid); List <JournalEntry> vsc = new List <JournalEntry>(); using (DbCommand cmd = cn.CreateCommand("SELECT * FROM JournalEntries WHERE TravelLogId = @source ORDER BY EventTime ASC")) { cmd.AddParameterWithValue("@source", tluid); using (DbDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { JournalEntry je = CreateJournalEntry(reader); vsc.Add(je); } } } return(vsc); }