c# - Mvc-infinite-scroll package null session -


i trying implement pakage

after load data db, store this:

session["reservations"] = futurereservations.todictionary(x => custindex++, x => x); 

then trying data need current page:

public dictionary<int, restaurants> getrecordsforpage(int pagenum)         {             dictionary<int, restaurants> reservations = (session["reservations"] dictionary<int, restaurants>);              int = (pagenum * recordsperpage);             int = + recordsperpage;               return reservations                 .where(x => x.key > && x.key <= to)                 .todictionary(x => x.key, x => x.value);         } 

the problem reservations variable stays null, if session info correct. can me figure out why?


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -