This is a brief description of my db. You have issues which have categories. I have various queries that get issues based on all sorts of criteria, but that's not important to the question.
I want to be able to take a list of issues I have queried, lets say for example, that occured yesterday and group them by category.
I have a method:
public static IEnumerable<Category> GroupIssuesByCategory(IEnumerable<Issue> issues)
{
return from i in issues
group i by i.Category into c
select c.key
}
Category has a nice mapping which allows it to list Issues within it. That's great for what I want, but in this scenario, it will pull back all the issues in that category, rather than the ones from the set I provided. How do I get around this?
Can I get around this?