Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var sql = new Sql()
.Where<Movie>(m => m.Title == "Avatar", dbContext.SqlSyntax);
var avatar = dbContext.Database.Fetch<Movie>(sql).FirstOrDefault();
sql = new Sql()
.On<ActorMovie, Actor>(dbContext.SqlSyntax, am => am.ActorId, ac => ac.Id)
.Where<ActorMovie>(am => am.MovieId == a.Id, dbContext.SqlSyntax);
avatar.Actors = dbContext.Database.Fetch<Actor>(sql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment