title: How to insert data to a sql server relational database that involve primary and foreign keys in C#
body: <p>I have a problem and really need your help.
  I have two inter-related tables which are:
  Persons(id(pk),first_name,last_name,age,address,gender_id(fk)).
  Genders(id(pk),gender_type).
  So by looking at these tables, you can see that the Genders table has a reference on the Persons table which is gender_id column.
  In my C# code, I have a gender combo box that fetches data from the Gender table(ie male and female).
  So what I want is when the user selects male, the male id should be save under the gender_id column in the Persons table like wise female.
  Any feedback will be highly appreciated.</p>