Skip to content

Instantly share code, notes, and snippets.

@tswann
Created January 28, 2014 19:06
Show Gist options
  • Save tswann/8674031 to your computer and use it in GitHub Desktop.
Save tswann/8674031 to your computer and use it in GitHub Desktop.
EF GetAll method with Context tracking turned off
public IQueryable<T> GetAll<T>() where T : class
{
return _stagingContext.Set<T>().AsNoTracking().AsQueryable();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment