If you have all the constraints set up correctly and you are using EF.
from t in tasks
.Include ("TaskTags")
.Include("TaskTags.Tags")
where t.tagId = 9 select t;
you should get back a nice object with all the info that you want.
Davy.
Davy,
"So you want to keep data which is local, only ever going to be local, only
needed locally, never accessed remotely, not WANTED to be made available
outside our building, which can only WEAKEN our security by being off site,
hosted offsite." BOFH: Simon Travaglia
On Tue, May 20, 2014 at 1:56 PM, <[email protected]> wrote:
> Starting to enjoy linq but have dilemma..
>
>
>
> I have 3 tables.... tasks, tasktags, and tags
>
>
>
> How can i create a linq query that returns all the tasks that have tag o f
> tagid=9
>
>
>
> Some tasks may have many tags, so only want to return unique tasks.....
>
>
>
> What methodology should i use to achieve this?
>
>
>
>
>
>
>
> Anthony Salerno | Founder | SmallBiz Australia
> Innovation | Web | Software | Developers | Support
> +613 8400 4191 | 2Anthony (at) smallbiz.com.au | Po Box 135, Lower
> Plenty 3093 ABN : 16 079 706 737
>
> www.smallbiz.com.au | www.linkedin.com/in/innovativetechnology
>
>
>
>
>
>
>
> Anthony
>
>
>
>
>