Windows 7 Phone Database Rapid Repository Eager Loading

Download the code and a fully working example application from


  1. Introduction
  2. Set up the Rapid Repository
  3. Create, Read, Update and Delete
  4. Eager Loading
  5. Examining Pending Changes
  6. Exclude entities from the cache


By default, all entities added, updated and queried using the Rapid Repository are added to a cache for improved performance.

To aid performance further, it is recommended that at the start of the application, the most frequently queried entities are Eager Loaded (Pre-Loaded) into the cache.

This is done as a background process so it will not hold up the application waiting for it to complete.

To eager load entities into the cache you simply do something similar to the following: (This assumes you have an entity called Customer)

Eager Load Entities Into Cache
  1. EntityCache.EagerLoad<Customer>();


The eager load routing can only run once per entity, so if you place it in the initialise of a page, it will only run the first time the page is called, subsequent calls to the page will not set of the eager load again. This is important as you would not want this to happen each time (only needs to happen once, the context manages the cache during normal operation).


Hope you find this feature useful.


Kind Regards,


Sean McAlinden.

No Comments