public static async Task <IEnumerable <VNicoHistory> > SelectNicoHistory(this SQLiteControl command) { var sql = new StringBuilder(); sql.Clear(); sql.AppendLine($"SELECT video_id, tick, cnt FROM v_nico_history ORDER BY tick DESC"); using (var reader = await command.ExecuteReaderAsync(sql.ToString())) { return(await reader.GetRows(r => new VNicoHistory(r))); } }
public static async Task <IEnumerable <TNicoFavorite> > SelectNicoFavorite(this SQLiteControl command) { var sql = new StringBuilder(); sql.Clear(); sql.AppendLine($"SELECT mylist_id, tick FROM t_nico_favorite ORDER BY tick DESC"); using (var reader = await command.ExecuteReaderAsync(sql.ToString())) { return(await reader.GetRows(r => new TNicoFavorite(r))); } }