title: Replacement for ExpressionHelper in ASP.NET Core 3.0?
body: <p>In ASP.NET Core 2.x I was using static method <code>GetExpressionText</code> of <code>ExpressionHelper</code> class for <code>IHtmlHelper&lt;T&gt;</code> extension method:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
  
  public static class HtmlHelperExtensions
  {
      public static string GetExpressionText&lt;TModel, TResult&gt;(
          this IHtmlHelper&lt;TModel&gt; htmlHelper,
          Expression&lt;Func&lt;TModel, TResult&gt;&gt; expression)
      {
          return ExpressionHelper.GetExpressionText(expression);
      }
  }
  </code></pre>
  
  <p>In ASP.NET Core 3.0 namespace <code>Microsoft.AspNetCore.Mvc.ViewFeatures.Internal</code> is not available any more. Therefore compiler is throwing exception:</p>
  
  <blockquote>
    <p>The name 'ExpressionHelper' does not exist in the current context.</p>
  </blockquote>
  
  <p>What is proper replacement for <code>ExpressionHelper</code> functionality?</p>