Skip to content

Instantly share code, notes, and snippets.

@PilotBob
Created March 24, 2016 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilotBob/df7119ea471fac1ed85e to your computer and use it in GitHub Desktop.
Save PilotBob/df7119ea471fac1ed85e to your computer and use it in GitHub Desktop.
if I do this:
var result = db.People.Where(p => p.first = "pilot" && p.last = "bob").Select(p => p.Id).SingleOrDefault();
Can I later do this and expect to find a result?
var result = db.People.Local.Where(p => p.first = "pilot" && p.last = "bob").Select(p => p.Id).SingleOrDefault();
Or since I did a projection is the entity not actually loaded into the context?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment