I have a drop down list that I am populating with the result set of a Entity Framework call to a SQL Server database. Currently, there are 20 records returned in that call, and I am thinking of using caching. I have never setup caching for a specific control before, can someone point me to a tutorial. Is this also kind of overkill, for that small data set?
Share
If this is ASP.NET then the easiest way to do the caching would be to use the HttpContext.Current.Cache object. It would work something like this in your code. You can find more information on the Cache class on MSDN.
If this is WPF/WinForms then the easiest way would be to just add a static field to your class and ‘cache’ the results of your EF query in that static field using the same logic as above.