title: Net Core MVC: Name Session does not exist in Current Context
body: <p>I am receiving an error in the last line.  How would I resolve this? Trying to convert Net 4.6.2 Project to MVC Net Core.</p>
  
  <pre><code>Last Line Error: Name Session does not exist in Current Context.
  
  public class TransferPropertyOwnershipController : Controller
  {
    public ActionResult GetNewOwnerRecord(int ownerID, int propertyID)
      {
          OwnerManager ownerManager = new OwnerManager();
          var newOwner = ownerManager.Get(ownerID, true);
  
          PropertyOwnerRoleViewModel newPropertyOwnerRoleViewModel = new PropertyOwnerRoleViewModel();
          newPropertyOwnerRoleViewModel.OwnerID = newOwner.OwnerID;
          newOwner.Address = new Model.Address();
          newPropertyOwnerRoleViewModel.Owner = newOwner;
          newPropertyOwnerRoleViewModel.IsPrimaryOwner = false;
          newPropertyOwnerRoleViewModel.OwnershipPercentage = 0;
          newPropertyOwnerRoleViewModel.PropertyID = propertyID;
  
          IQueryable&lt;PropertyOwnerRoleViewModel&gt; currentOwnersResult = Session[_currentOwnersResult] as IQueryable&lt;PropertyOwnerRoleViewModel&gt;;
  </code></pre>
  
  <p><strong>Proposed Solution:</strong></p>
  
  <p><strong>Number 1</strong></p>
  
  <pre><code>HttpContext.Session.GetString(_currentOwnersResult]) 
  
  Error Text: 'ISession' does not contain a definition for 'GetString' and no accessible extension method 'GetString' accepting a first argument of type 'ISession' could be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p><strong>Number 2</strong></p>
  
  <pre><code>IQueryable&lt;PropertyOwnerRoleViewModel&gt; currentOwnersResult = HttpContext.Current.Session(_currentOwnersResult]) as IQueryable&lt;PropertyOwnerRoleViewModel&gt;;
  
  Error Text: 'HttpContext' does not contain a definition for 'Current' and no accessible extension method 'Current' accepting a first argument of type 'HttpContext' could be found (are you missing a using directive or an assembly reference?)
  </code></pre>
  
  <p><strong>Resources:</strong></p>
  
  <p>Trying to utilize this solution, but having issues.
  <a href="https://stackoverflow.com/questions/6969563/session-does-not-exist-in-the-current-context">&#39;Session&#39; does not exist in the current context</a></p>