Last active
January 12, 2017 03:02
-
-
Save JonathanMagnan/e0905a611a8230e1dbb798abbf5d991f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// using Z.EntityFramework.Plus; // Don't forget to include this. | |
var ctx = new EntitiesContext(); | |
// The first call perform a database round trip | |
var countries1 = ctx.Countries.FromCache().ToList(); | |
// Subsequent calls will take the value from the memory instead | |
var countries2 = ctx.Countries.FromCache().ToList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment