开发者

Linq updating two tables I need Autoid value

I am doing some activity that will update two tables. One of the tables have an autoid which I need inserted in the other table. The field that stores the autoid value is used a like a foreign key to different tables depending on context.

When updating I face the problem that the autoinc Id开发者_运维百科 does not have a value until its saved.

i have thought of having separate datacontexts for the two tables doing submit on one before the other but the I guess it will be very slow submitting for each row.

What are my options here, I guess I cannot have the foreign key to multiple tables as that would solve the problem ??

Martin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜