Skip to content

Instantly share code, notes, and snippets.

@neilgaietto
Last active August 29, 2015 14:08
Show Gist options
  • Save neilgaietto/62046966f29a5de024b0 to your computer and use it in GitHub Desktop.
Save neilgaietto/62046966f29a5de024b0 to your computer and use it in GitHub Desktop.
Create and Map within LINQ Select
var dtoItems = DataContext.Sources.Select(new Func<Source, SourceDTO>(s => {
var dto = new SourceDTO();
s.Map(dto);
return dto;
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment