Skip to content

Instantly share code, notes, and snippets.

@kidchenko
Created October 22, 2013 18:18
Show Gist options
  • Save kidchenko/7105377 to your computer and use it in GitHub Desktop.
Save kidchenko/7105377 to your computer and use it in GitHub Desktop.
Linq para retornar apenas um sub-entidade sem obter a entidade por completa.
var juca = target.SelectMany(x => x.Entidade)
.SingleOrDefault(y => y.SubEntidade.Equals(argumento));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment