Method LoadDatasetOnStartup
LoadDatasetOnStartup(String)
This method loads item in dataset on cache startup.
Declaration
object LoadDatasetOnStartup(string dataset)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataset | Dataset for which loader is called. |
Returns
Type | Description |
---|---|
System.Object | Result of loading dataset. |
Examples
The following example 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;