I have a list of lists that I created with LINQ to contain a status code object:
List<List<StatusLookup>> statusList = new List<List<StatusLookup>>();
foreach(var action in DbmsReport.Actions){
statusList.Add((from stat in MyFactory.CreateQueryable<StatusLookup>()
where stat.ActionTypes.Contains(action)
select stat).ToList());
}
I now need to somehow parse this statusList and find all of the StatusLookup objects that are in each list of lists, so for example:
DbmsReport.Actions = ( sprint, fight );
StatusLookup = ( { id = 0, text = "exhausted", ActionTypes = ( sprint, fight ) }
{ id = 1, text = "tired", ActionTypes = ( jog, sprint, fight ) }
{ id = 2, text = "rested", ActionTypes = ( sleep ) }
);
So in this case I'd need to get a list that contains StatusLookup for "exhausted" and "tired" in no particular order, what is the best way to get this list? As can be seen in this example, there can be either 1 or more than 1 StatusLookup for each DbmsReport
DbmsReport.Actions = (spring,fight)do you want all StatusLookup where ActionTypes contain sprint and fight or where ActionTypes contains sprint OR fight