Last active
August 29, 2015 14:08
-
-
Save neilgaietto/62046966f29a5de024b0 to your computer and use it in GitHub Desktop.
Create and Map within LINQ Select
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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