Reputation: 243
I am working in a windows based application which uses master data for every transaction. This master data normally doesn't change but in some cases it can be change. I am fetching this data into cache or DataSet
once and use it for future transactions, but don't want to use time to extract data from database if data get changed in master table.
I want to create a dependency on a DataTable
so that if data get changed only at that time it get information from database. As It is a windows based application and I didn't found any support for caching in Windows application, how can I do this either by caching or by DataSet
?
Upvotes: 5
Views: 12519
Reputation: 4127
"As It is a windows based application and I didn't found any support for caching in Windows application"
This is False.
You can get caching class in Framework 4.0. It can be either windows based applications or web-based. Here are the docs.
Example:
using System.Runtime.Caching;
private static MemoryCache cache = MemoryCache.Default;
Upvotes: 8