i have it , here u can se hole my codeforeach (GridViewRow gvRowAssigment in GridViewAllAssigments.Rows) { var emp_assig_ref = new EMPLOYEES_ASSIGMENT_REFERENCE(); emp_assig_ref.reference_name = gvRowAssigment.Cells.Text; emp_assig_ref.reference_id = new Random().Next(); var emp_assig_teh = new EMPLOYEES_ASSIGMENT_TECHNOLOGY(); emp_assig_teh.technology_name = gvRowAssigment.Cells[7].Text; emp_assig_teh.assigment_technology_id = new Random().Next(); var emp_assig_tools = new EMPLOYEES_ASSIGMENT_TOOLS(); emp_assig_tools.tools_name = gvRowAssigment.Cells[6].Text; emp_assig_tools.assigment_tools_id = new Random().Next(); var emp_assigment = new EMPLOYEES_ASSIGNMENT { from_date = gvRowAssigment.Cells[0].Text, to_date = gvRowAssigment.Cells[1].Text, area = gvRowAssigment.Cells[2].Text, sector = gvRowAssigment.Cells[3].Text, company_name = gvRowAssigment.Cells[4].Text, description = gvRowAssigment.Cells[5].Text, employee_id = emp.employee_id, assigment_id = new Random().Next(), EMPLOYEES_ASSIGMENT_TOOLS = emp_assig_tools, assigment_tools_id = emp_assig_tools.assigment_tools_id, EMPLOYEES_ASSIGMENT_TECHNOLOGY = emp_assig_teh, assigment_technology_id = emp_assig_teh.assigment_technology_id, EMPLOYEES_ASSIGMENT_REFERENCE = emp_assig_ref, reference_id = emp_assig_ref.reference_id }; emp.EMPLOYEES_ASSIGNMENT.Add(emp_assigment); } db.AddToEMPLOYEES(emp); db.SaveChanges(); }