title: .NET core web api send bad request to client
body: <p>I am writing a web api in a .net core web project.</p>
  
  <pre><code>// POST: api/Companies
  [HttpPost]
  public void Post([FromBody]string value)
  {
      if (string.IsNullOrEmpty(value))
      {
          // inform the client that request is incorrect.
      }
  }
  </code></pre>
  
  <p>I want to be able to inform the client that its a bad request, I found many articles but all were 1-2 years old, I am sure a lot has changed since then. So wanted to know the best solution for this problem.</p>