471,330 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Linq. Delete and Create

Hello,

I have a table named Tags with the two fields: TagID and Name.

I have a variable named MyTags which is a list of Tag.
It contains many tags but only the name, not the TagID.

Is it possible to do the following in one step?
1. Get the ID's of all the existing tags (compare using the name) and
fill MyTags IDs
2. The tags that are not found should be created using the Name in
each MyTags tag and then get the ID of each one to fill MyTags

If this is not possible in one step, how can I do it in two steps?

Thanks,
Miguel
Jul 1 '08 #1
0 802

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by shapper | last post: by
3 posts views Thread by shapper | last post: by
15 posts views Thread by EDBrian | last post: by
reply views Thread by EDBrian | last post: by
3 posts views Thread by Leo Seccia | last post: by
15 posts views Thread by shapper | last post: by
6 posts views Thread by Arjen | last post: by
reply views Thread by Big Daddy | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.