How to use Sessions in ASP.NET Core?
Source Code Link : https://drive.google.com/file/d/1WmqRCDPWdODKZwfRX3zrSWytv1fI6Qah/view?usp=sharing
HTTP is a stateless protocol. By default, HTTP requests are independent messages that don’t retain user values. State can be stored using several approaches. We can use any of the Session, Cookies, Hidden Fields etc.
Session state is an ASP.NET Core scenario for storage of user data while the user browses a web app. Session state uses a store maintained by the app to persist data across requests from a client. The session data is backed by a cache and considered ephemeral data. The site should continue to function without the session data. Critical application data should be stored in the user database and cached in session only as a performance optimization.