Ejemplo n.º 1
0
    public List <PCO.PCOItem> GetSongHistory(string songIDString, DateTime startDate)
    {
        int songID = 0;

        Int32.TryParse(songIDString, out songID);

        //List<PCO.PCOItem> songsPlayed = AllServices.Where(s => s.Songs.Find(p => p.SongID == songID));

        List <PCO.PCOItem> songsPlayed = AllServices.Where(d => d.Date >= startDate).SelectMany(q => q.Songs).Where(a => a.SongID == songID).ToList();

        songsPlayed.Reverse();
        return(songsPlayed);
    }
Ejemplo n.º 2
0
 public IEnumerable <ServiceViewModel> GetServiceTypesByCategory(ServiceCategory cat)
 {
     return(AllServices.Where(s => s.Category == cat && s.Selected).ToList());
 }