Well, there are many possibilities for how you write the logic to retrieve the images from the remote DB; but you seem to be leaning toward a bulk operation where you just get them all at once, or maybe just install them with the app. You may need some facility for updating the local store when images are added, changed, or deleted on the remote db.
But let's say that's all outboard of the normal operation of your app, so that you're only job is to get a particular image when needed for display. Given your relatively complex algorithm for retrieval of a particular image for immediate use (first look in cache; then in the local db; then in the remote), it will probably be better if your Employee and EmployeeImage tables aren't joined in a relationship, so that the Employee entity has no EmployeeImage property on it. That's because DevForce's normal behavior is to look for a navigation property entity (EmployeeImage) first in the cache, and then in the remote Db if its best information says it isn't already in the cache. There's no easy way of fudging this to insert a look at a local db into the middle.
But let's say you wire some logic to a button, or to the event of navigating to a new Employee on a form. The handler for that event can do a cache-only search for the image of Employee 123456; if that returns the null entity it can attempt to retrieve it from the local db; if that produces nothing then it can do a datasource-only retrieval. And of course, if the latter is required, you could put some logic right there to save it to the local db at the same time.
Once you've viewed a given image during a given application session, it will, of course, always be found in the cache. If there's a ever problem with so many images getting loaded that the cache gets too large, you can always remove images from the cache.
I suppose another way to go might be to go ahead and relate the Employee and EmployeeImage tables, then introduce a DataConverter into any databindings that kicks into action if the EmployeeImage property returns the null entity. You'd want to prototype that, of course, to see if any issues arise.
>>
If I use the Local_EntityManager the stuff will be saved to LocalDB great but how would I get that data back to the remote DB when I come back online. I’m trying to avoid using Merge Replication
<<
Is the user changing the images locally, or adding new ones? If so, and assuming the image is a property of an Entity, then they'll be persisted according to the same rules that other modified properties are. If offline you simply save them to your EntityStateFile; when back online you read them from the EntityStateFile into the cache (unless you happen to know that they're already there) and then do a normal save.