I Have these entities:
public class Article {
public int Id { get; set; }
public virtual IList<Tag> Tags { get; set; }
}
public class Tag {
public int Id { get; set; }
public virtual IList<Article> Articles { get; set; }
}
I load an Article by its Tags like this:
var articleByTags = context.Articles.Include(a => a.Tags).FirstOrDefault(a => a.Id == someId);
Now, how can I get a list of articles, that have must common tags with the selected article? Can you help me please?
Good question. Here is solution: