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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -