Created
May 27, 2014 05:49
-
-
Save AhmedKamal/06968a408487c3fd0b3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static List<NewsStory> GetNewsStoriesFromClusters(IQueryable<Cluster> clusters) | |
{ | |
List<NewsStory> result = new List<NewsStory>(); | |
clusters.ToList<Cluster>().ForEach(x => result.Add(new NewsStory | |
{ | |
LastUpdate = x.LastUpdate | |
, | |
CategoryID = x.Category.CategoryID, | |
ClusterID = x.ClusterID, | |
Items = from e in de.Items | |
where e.ClusterID == x.ClusterID | |
select e | |
})); | |
return result; | |
} | |
public class NewsStory | |
{ | |
public IQueryable<Item> Items { get; set; } | |
public Nullable<long> CategoryID { get; set; } | |
public System.DateTime LastUpdate { get; set; } | |
public int ClusterID { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment