Skip to content

Instantly share code, notes, and snippets.

@sniffdk
Created November 16, 2012 13:54
Show Gist options
  • Save sniffdk/4087525 to your computer and use it in GitHub Desktop.
Save sniffdk/4087525 to your computer and use it in GitHub Desktop.
// Problematic short example
var q = db.X.All().Join(db.Y, XId: db.X.Id).WithY();
// Problematic real example
var q = db.List.All().Join(db.Question, ListId: db.List.Id).WithQuestion();
// Suggested short example
var q = db.X.All().Join(db.Y, XId: db.X.Id ).With(db.X.Y);
// Suggested real example
var q = db.List.All().Join(db.Question, ListId: db.List.Id ).With(db.List.Question); // correct ?
@ThatRendle
Copy link

OK, try

dynamic question;
var q = db.List.All().Join(db.Question, out question).On(question.ListId == db.List.Id ).With(question);

Your original code should work, though; I will find out why it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment