I have 3 different functions on my page. 1.) Search, 2.) Sort and 3.) Paging
I have all of this working, but I was wondering if anyone know how, or can point me somewhere that shows how to save, per user, the dataset so they can sort and page without searching again and then also when the user Searches to pull the data again.
I'm currently using MVC5, Bootstrap, and PagedList.MVC
Here's an example of what I need. I honestly am not sure how to or even if I should cache the data, but it seems like I would want to as this data changes regularly (they are events from a DB) and I'd like the user to work with the dataset they searched and not with a new dataset every time they page or sort.
if (model.ActionPerformed == "search")
{
// it was a search, so let's pull new events in.
events = Business.Events.GetEvents(GetCurrentSearchParameters(model));
}
if (model.ActionPerformed == "sort")
{
events = null // need to grab events from the cached dataset?
}
if (model.ActionPerformed == "page")
{
events = null // need to grab events from the cached dataset?
}
