Created
July 25, 2017 16:36
-
-
Save filipececcon/7aad80767bffca5ca117681dcc965699 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public override IEnumerable<Player> GetAll() | |
{ | |
using (var db = new SqlConnection(ConnectionString)) | |
{ | |
return db.GetAll<Player, Team, Player>((player, team) => | |
{ | |
player.Team = team; | |
return player; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment