Method LoadDatasetOnStartup
LoadDatasetOnStartup(String)
Responsible for loading of items.
Declaration
object LoadDatasetOnStartup(string dataset)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataset | dataset for which loader is called. |
Returns
Type | Description |
---|---|
System.Object |
Examples
Following examples loads product or order into cache based on the dataset
OrderedDictionary orderedDictionary = new OrderedDictionary();
string key = "";
ProviderCacheItem cacheItem = null;
if (dataset.Equals("Product"))
{
key = "Product";
cacheItem = new ProviderCacheItem("Product");
}
else if (dataset.Equals("Order"))
{
key = "Order";
cacheItem = new ProviderCacheItem("Order");
}
else if (dataset.Equals("Customer"))
{
key = "Customer";
cacheItem = new ProviderCacheItem("Customer");
}
orderedDictionary.Add(key, cacheItem);
LoaderResult result = new LoaderResult();
result.Data = orderedDictionary;
result.HasMoreData = false;
return result;