I have an object named game which has a property called channels (which is comma separated since a game can relate to more then one channel).
I also have a channel object, which contains a property called isActive.
What I need, is a way to get all the games that have active channels.
I started writing this:
var oGames = games.AllActive.Where(
g => !g.StateProperties.Channels.Contains(
channels.All.Where(c => c.StateProperties.IsActive).ToArray()
);
but got blocked… anyone can help me ?
I’d strongly recommend moving away from a csv of channel names, and instead store a reference to them.
This would simplify the code quite a lot. Using a dictionary mapping strings to channels would also help.