views:

5

answers:

0

What an awkwardly worded question, you're thinking?

When my application loads, it goes to the database and gets several different lookup tables worth of data and creates .NET Lists for each one and puts them in cache. For example, "Status".

List at this point: On, Off

When I retrieve the List of Statuses from the cache, I add another item to the List, "Choose One" and the set it as the ItemsSource of a ComboBox. At no point do I put the new List, now containing "Choose One" in addition to the list of statuses back into the cache.

List<ContractStatus> contractStatuses = (List<ContractStatus>)this._cacheManager["CurrentContractStatuses"];

        ContractStatus contractStatus = new ContractStatus
            {
               ContractStatusDescription = "Choose One", ContractStatusId = 0 
            };
        contractStatuses.Insert(0, contractStatus);

List at this point: Choose One, On, Off

Yet if I go to another screen and come back, the screen's load routine pulls the list of statuses from the cache, and Choose One is already in the list. So when the routine adds "Choose One" I wind up with:

Choose One, Choose One, On, Off

Is this by design? How in the world do I tell it to quit?