title: Web API 2 Http Post Method
body: <p>I am disgusted not have found a solution to this problem.</p>
  
  <p>I started creating a new api using Web API 2 and just cannot get the POST and PUT to work. The Get all and Get single item works perfectly fine.</p>
  
  <p>There are no related articles anywhere, and those that i've found relates only to Gets and Web API, but not Web API 2.</p>
  
  <p>Any assistance would do please.</p>
  
  <pre><code>    // POST: api/checkOuts
      [HttpPost]
      [ResponseType(typeof(checkOut))]
      [ApiExplorerSettings(IgnoreApi = true)]
      public async Task&lt;IHttpActionResult&gt; PostcheckOut(checkOut co)
      {
          if (!ModelState.IsValid)
          {
              return BadRequest(ModelState);
          }
  
          db.checkOuts.Add(checkOut);
  
          try
          {
              await db.SaveChangesAsync();
          }
          catch (DbUpdateException)
          {
              if (checkOutExists(checkOut.id))
              {
                  return Conflict();
              }
              else
              {
                  throw;
              }
          }
  
          return CreatedAtRoute("DefaultApi", new { id = checkOut.id }, checkOut);
      }
  </code></pre>
  
  <p>So basically, I'm just attempting to get a debug into the method.</p>
  
  <p>Was especially disappointed in this link as it covered almost everything, but ai. <a href="http://www.asp.net/web-api/overview/web-api-routing-and-actions/create-a-rest-api-with-attribute-routing" rel="noreferrer">http://www.asp.net/web-api/overview/web-api-routing-and-actions/create-a-rest-api-with-attribute-routing</a></p>
  
  <p>Regards</p>