How can I query a many-to-many relationship using Entity Framework code first and linq? The problem is that EF create automatically the relation table. So, I don't have it in my context.
This is the relational model:
I need a list of Articles for a specific Category_Id, basically replicate something like that:
select a.Id, a.Title,a.ShortDescription
from Articles a
join CategoryArticles ca on ca.Article_Id=a.Id
where ca.Category_Id = @parameter
However my dbcontext only have :
public DbSet<Article> Articles { get; set; }
public DbSet<Category> Categories { get; set; }.
Thanks for any help.