I’ve set up a tagging system
I belive it is the “toxi” solution with the following tables:
Books[id,author, title] has many-to-many relationship with
Tags[id, tagName]
BookHasTag[id, bookId, tagId] junction-table
using linq-sql I want to:
- select the top 20 most popular tags and have their count with it
- given a books id, get all the info about the book, including tags associated with it
- a list of all books that are associated with a particular tag
Please can you help, I know it’s a little cheeky, and I know SO usually like to see you have made an effort, but for the sake of brevity i’m leaving out my failed attempts.
If I understand you correct you want something like this:
select the top 20 most popular tags and have their count with it
given a books id, get all the info about the book, including tags associated with it
a list of all books that are associated with a particular tag