Entity Framework Adding new record with foreign key constraint

Posted by Brono The Vibrator on Stack Overflow See other posts from Stack Overflow or by Brono The Vibrator
Published on 2010-04-23T19:41:50Z Indexed on 2010/04/26 18:43 UTC
Read the original article Hit count: 917

Filed under:
|

In an effort to learn the entity framework I have created two tables in a one to many relationship. The one table (Author) has the following fields - AuthorID, FirstName, LastName. The many table (Payroll) has the following fields - PayrollID, AuthorID, Salary. I have CRUD stored procdures for insert, update and delete. What I am tying to figure-out is how to add new payroll records to the payroll table.

© Stack Overflow or respective owner

Related posts about c#

Related posts about entity-framework