views:

46

answers:

1

linq-to-sql is giving me this error "Can't perform Create, Update, or Delete operations on 'Table(Friend)' because it has no primary key." from a table with a composite primary key

+1  A: 

LINQ-to-SQL performs best with a single field int as a primary key. If you have a composite primary key, your best bet is to create a surrogate key for that table using a single integer field.

Neil T.