Session state in ASP.NET Core
<p>In regular MVC, I'm used to be able to do the following:</p>

<pre><code>public ActionResult SomeAction(){
    Session["User"] = new User();

    return View();
}
</code></pre>

<p>Giving me this option in the view:</p>

<pre><code>&lt;div&gt;
    @if(Session["User"] != null){
        &lt;p&gt;Welcome @Session["User"].Username&lt;/p&gt;
    }
&lt;/div&gt;
</code></pre>

<p>In ASP.NET Core, Session state isn't implemented because of the various OS' capable of running this application. I've seen that I can use <code>IMemoryCache</code> and <code>IDistributedCache</code> instead, but I'm not quite sure how, given this scenario.</p>

<p>Any simple and well explained methods for doing this?</p>