title: N-Teir Architecture with ASP.NET Web API
body: <p>I'm just trying to wrap my head around this concept.  I have written a couple different Web APIs but they have always been consumed by a website and interacted via JSON.  I have a question about how to structure the implementation when the Web API will be consumed by a windows service.</p>
  
  <p>In this case there is already an existing Database so I want to use Entity Framework's Database First approach.</p>
  
  <p>I create a Class Library project for the models and use Entity Framework to look at the existing database and generate all of the required classes.</p>
  
  <p>Then I create a Web API Project and add my Class Library with all of the models to it.  Up to this point I am good.</p>
  
  <p>My question is when I go to build the Windows Service that will interact with the Web API, how do I access the classes from my Class Library model project?  I know I could add that project to my windows service but that doesn't seem like the correct approach because that would pretty much by-pass the Web API.  </p>
  
  <p>I guess my question is if I want to create and pass an Employee object to my Web API (so it can insert it into the database) from my windows Service, how does the windows service get the Employee object without adding the Class Library to the Windows service project?</p>