var sql = new Sql() | |
.Select("Movies.*, Directors.*") | |
.From<Movie>(dbContext.SqlSyntax) | |
.InnerJoin<Director>(dbContext.SqlSyntax) | |
.On<Movie, Director>(dbContext.SqlSyntax, m => m.DirectorId, d => d.Id); | |
var movies = dbContext.Database.Fetch<Movie, Director, Movie>((m, d) => | |
{ | |
m.Director = d; | |
return m; | |
}, sql); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment