Link to home
Start Free TrialLog in
Avatar of Jazzua
Jazzua

asked on

repopulate primary key after linq to sql delete

Hi There experts,
I'm new to linq. I've got a delete function working in my windows form app using c# linq to sql to remove a row from my database. It works fine, I was just wondering if there was an easy way to reorder the primary key of the table the record was deleted from after the delete. by which i mean, currently if i have 3 records and i delete record number 2 then i will be left with a record with an id of 1 and a record with an id of 3. Is there a way to make the id's re-order themselves so in the above scenario when record 2 was deleted record 3 would now have an id of 2?
ASKER CERTIFIED SOLUTION
Avatar of naspinski
naspinski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jazzua
Jazzua

ASKER

cheers :)