Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Insert only those objects that are not already in the database
- var tags = context.Tags.Where(t => t.ItemId = itemId) // search via your item
- .Select(t => t.TagValue);
- var newTags = myItem.Tags.Where(t => !tags.Contains(t.TagValue));
- var existingTags = myItem.Tags.Where(t => tags.Contains(t.TagValue));
Add Comment
Please, Sign In to add comment