title: HttpContextBase namespace could not be found
body: <pre><code>public string GetCartId(HttpContextBase context)
  {
      if (context.Session[CartSessionKey] == null)
      {
          if (!string.IsNullOrWhiteSpace(context.User.Identity.Name))
          {
              context.Session[CartSessionKey] =
                  context.User.Identity.Name;
          }
          else
          {
              // Generate a new random GUID using System.Guid class
              Guid tempCartId = Guid.NewGuid();
              // Send tempCartId back to client as a cookie
              context.Session[CartSessionKey] = tempCartId.ToString();
          }
      }
  
      return context.Session[CartSessionKey].ToString();
  }        
  </code></pre>
  <p>Any help on the work around with HttpContextBase in asp.net core? above is my sample code am working on to create a shopping cart.</p>