title: disposing httpClient in aspnetcore mvc controller
body: <p>I am creating a new Asp.Net Core (net standard 2) Mvc controller that uses a WebAPI (REST) call to obtain the data.  I was following many of the examples shown all over the Interweb from both microsoft and non-microsoft sources.  These all use the "standard"  using(var client = new HttpClient()) construct.<br>
  However, then read the documentation for <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netcore-2.0" rel="nofollow noreferrer">HttpClient</a></p>
  
  <blockquote>
    <p>HttpClient is intended to be instantiated once and re-used throughout
    the life of an application. Instantiating an HttpClient class for
    every request will exhaust the number of sockets available under heavy
    loads. This will result in SocketException errors. Below is an example
    using HttpClient correctly.</p>
  </blockquote>
  
  <p>This got me thinking, do I create a scoped instance and add it to DI, or follow their example on the same page, and create a static instance on the controller?  If a static instance, how do I dispose it?</p>
  
  <p>Alternately, can anyone point me to a production ready MVC wrapper for a standard CRUD view implementation?</p>