If you’ve ever worked in the codebehinds of the latest versions of AspDotNetStorefront, you’ve probably run into this problem before. Or perhaps you’re smarter than me and already knew this in which case, this isn’t for you. 😉
With the new Multi-Store feature in v9.x of AspDotNetStorefront, there are instances where you need to access the StoreId for one reason or another. The problem is, none of the available classes (this, order, page, etc) seemed to be exposing this value. You could look at this.SkinId but this is not an optimum solution since you can add multiple stores to the same Skin.