Sorry this was outdated and I never updated it.
We want to be able to create sub-groups that have the same name as other sub groups.
Say we have
each with the subgroups
I want to be able to search for all tickets in the sub-groups A or B reguarless of which group they are in. (The search page doesn't even pull back sub-groups in the release code unless you select a group.)
I managed to figure out how to change the query. Also notice that I removed all the ternary operation, I think your going a little too much work in this fuction.
public static IEnumerable<ticket> GetTickets(stDataContext db,string subgroup, bool? active)
return from p in db.tickets
(active == null || p.active == active) //What I simplifed
&& p.sub_unit.sub_unit_name == subgroup //Added Filter