I have two tables ,
1. News
2. Shop
And I have creating three API's
1. GetNews
2. PostNews
3. DeleteNews
Now, I want to insert the data by using PostNews API. But there is a problem in News Table that Shop Table contain PK(id) which is FK in News Table, so how can i insert the data in News Table, require code snippet for API....

Bhuvanesh MohankumarPosted Apr 29, 2016, 7:49 AM
Hope you are using the Entity Framework,
you have to have valid row of data in [Shop] before inserting any data reference to [News] table.
Dr.Ajay KashyapPosted May 9, 2016, 8:07 AM
Vincent Maverick Durano
Vincent Maverick DuranoPosted Apr 29, 2016, 7:47 AM