Skip to content

Instantly share code, notes, and snippets.

@StefanoFiumara
Created April 11, 2014 04:20
Show Gist options
  • Save StefanoFiumara/10440690 to your computer and use it in GitHub Desktop.
Save StefanoFiumara/10440690 to your computer and use it in GitHub Desktop.
return new Dictionary<string, dynamic>()
{
{"firstName", firstName},
{"lastName", lastName},
{"ssn", ssn},
{"allEvaluationsPassed", allTestsPassed},
{"reasons", !allTestsPassed ? failureList : null}
}
.Where(entry => entry.Value != null)
.ToDictionary(k => k.Key, v => v.Value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment