title: Post request to database associated with primary and foreign key in web api using Entity Framework
body: <p>I have a database with three tables  with primary and foreign key association .</p>
  
  <p>I am using Web API and Entity Framework to auto generate methods. I have been successful doing that. But I want to insert into a table with foreign key separately.</p>
  
  <p>Currently, I am able to get a <code>JSON</code> object for the main table which has primary key and navigation properties to the table with a foreign key.
  <a href="https://i.stack.imgur.com/l3bIm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l3bIm.png" alt="enter image description here"></a></p>
  
  <p>I have created the web api using auto generate read write action methods like .
  <a href="https://i.stack.imgur.com/h4F3G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h4F3G.png" alt="enter image description here"></a></p>
  
  <p>I am able to access the json object for floors database and accordingly for Meter and Router . So , I have a post method "/api/floorinfoes" with POST .
  But , what to do , if i want to insert separately into RouterInfo  table and MeterInfo table .Eg: If i want to insert one row in MeterInfoes table, then how to proceed with that .</p>