title: Consuming Web API in Class library
body: <p>I'm building plugin  in auto-cad  and using class library and web API with entity framework 
  But every time i try to consume web API in my class library the  response returns with  "Not Found".
   This is my code of class library</p>
  
  <pre><code>[CommandMethod("Doit")]
        public void Test()
      {
          Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
  
          Checker c = new Checker() { WholeArea = 1000, BuildingArea = 200, Status = 1 };
  
          using (var client = new HttpClient())
          {
              client.BaseAddress =new  Uri("http://localhost:52133/api");
              client.DefaultRequestHeaders.Accept.Clear();
              client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
              HttpResponseMessage response = client.PostAsJsonAsync("Checker", c).Result;
              if (response.IsSuccessStatusCode)
              {
                  ed.WriteMessage("Hello data");
              }
              else
              {
                  ed.WriteMessage((response.StatusCode).ToString());
              }
          }
      }
  </code></pre>
  
  <p>This my controller Post Method </p>
  
  <pre><code>// POST: api/Checkers
      [ResponseType(typeof(Checker))]
      public IHttpActionResult PostChecker(Checker checker)
      {
          if (!ModelState.IsValid)
          {
              return BadRequest(ModelState);
          }
  
          db.Checkers.Add(checker);
          db.SaveChanges();
  
          return CreatedAtRoute("DefaultApi", new { id = checker.ID }, checker);
      }
  </code></pre>
  
  <p>Firstly :Now i don not know what is the problem of that code to return not found 
  Second- If there is away to build plugins in auto-cad using .net core </p>