Please sign in to comment.
Check on primary key field when inserting object
Since we assume an identity column anyway (we check for @@IDENTITY after insert) let's assume that the identity column is the same as the primary key. If I insert a POCO the primary key column is there and thus the column is added to the SQL insert statement. Proposed change filters the primary key column out from the list of properties.
- Loading branch information...