title: ASP.NET Core 3.1 "Unsupported handler method return type 'Microsoft.AspNetCore.Mvc.Rendering.SelectList'"
body: <p>As soon as set the return type of a function as <strong>SelectList</strong> I get this error:
  <strong>Unsupported handler method return type 'Microsoft.AspNetCore.Mvc.Rendering.SelectList'</strong></p>
  <pre><code>        public SelectList OnGetCategories()
          {
              //whatever
              return null;
              
          }
  </code></pre>
  <p>The body of function does not matter.</p>
  <p>I even do not use the function, being the function in the code is enough for raising error.</p>
  <p><strong>SelectList</strong> or <strong>Null</strong> output does not matter.</p>
  <p>This code was working in ASP.NET Core 2.2 without any error and I could call it by jQuery Ajax to retrieve my categories in a proper format.</p>