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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -