Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pparadis
Last active September 9, 2015 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pparadis/0844f30f5ef39726d7f1 to your computer and use it in GitHub Desktop.
Save pparadis/0844f30f5ef39726d7f1 to your computer and use it in GitHub Desktop.
var results = users.SelectMany(p => p.Departments, (user, departement) => new Tuple<string, string>(user.Name, departement.Name));
foreach(var userAndDepartment in results)
{
Console.WriteLine(string.Format("User: {0} - Department: {1}", userAndDepartment.Item1, userAndDepartment.Item2));
}
Console.ReadKey();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment