ASP.NET Core MVC – Start session extension modularized

I got a feature request that I should store something on session start. In the old ASP.NET Framework world it was easy because we had Globbal.asax.cs and its Session_Start event. The original answer to this question is here. But, as I prefer overengineering modular architecture and Sitecore Helix principles I wanted to make it extensible without touching this Foundation piece of code. As you probably know we have Startup.cs instead of Global.asax.cs and DistributedSessionStore. To extend the Create method of the DistributedSessionStore you can just simply inherit from its interface ISessionStore.

Continue reading “ASP.NET Core MVC – Start session extension modularized”