How to do update table with composite key

Apr 17, 2012 at 12:12 AM
Edited Apr 17, 2012 at 12:16 AM

Hi,

I am new to all this linq to sql, I am really having difficulty updating a table with composite key, it errors out saying table x contains composite key while updating the table. Basically I have an Order, order is initially created by an end user, then admin goes in and edit's the whole order, which has Order, orderdetails, company, purchases, etc tables. My company table has compund key of OrderId and AddressType(Billing or Shipping).  I need to go through and update all these tables while admin submit's the order.

TableStaticRepository.Update(entity, false);

I need to paste more code in here but paste is not working here for some reason.

Pealse help me asap.

Thanks,
Amit

 

Jan 28, 2013 at 5:14 PM

Unfortunately composite keys aren't supported in LinqToSql, thus, they're not supported in this project.