title: .Net Core Use Session in Class
body: <p>I am using Session in .Net core, However i am able to set and get the Session data in Controller like</p>
  
  <pre><code>HttpContext.Session.SetString("User", "True");
  var user = HttpContext.Session.GetString("User");
  </code></pre>
  
  <p>But when i am trying to use the same code in a concrete class i am not able to do so. It does not show <strong>GetString</strong> or <strong>SetString</strong> after  <strong>HttpContext.Session</strong>.</p>
  
  <p>It does not work after </p>
  
  <pre><code>HttpContext.Session
  </code></pre>
  
  <p>Please help
  Thanks</p>