Unique Identifier vs Data Pool

Sep 16, 2011 at 10:29 AM

Hi,

Great framework so far, it's doing exactly what I need. Just wanted to give some feedback on an area I found confusing until I realised what was happening.

In the tutorial Step 2 it describes the load context taking a Unique identifier in the constructor, but as you've shown with the LoginLoadContext, this isn't always the case and there are instances where there is no unique identifier (e.g. /news).

You described the unique identifier like a primary key in database terms but it seems more like criteria than the id. For example it could be a data range or it could be a category and generally relates to multiple entities (since you're retrieving a collection). In your example ZipCode is not unique for each of the entities being retrieved, it is more of a criteria or grouping of the entities retrieved. It could also retrieve different data on different days so doesn't really uniquely identify data.

Therefore would it be better to refer to the single load context parameter as a DataPoolName?

Just my 2p

Dec 2, 2011 at 4:50 PM

Thanks for taking the time to post that.  I had not looked at it that way.

In SOME scenarios you do want to simple refer to a collection of data this way.  I ran into this while trying to lump together recent tweets under a specific hashtag.  No need to make each one distinct.  I only want the last x entries for that tag.

So I now setup the LoadContext on my hashtag, and then have a collection in the viewmodel of those tweets.