i want to make it straight forward because i tried a lot of stuff and none of them seems to work for me.
Categories = await _context.Categories.ToListAsync(),
CategorySubjects = await _context.CategorySubjects
.Include(s => s.Books.Where( == true))
.ToListAsync(),
Books = await _context.Books.Where(b => b.Active == true).ToListAsync()
I have this piece of code where i want to get all categorysubjects with all books in them where the active of book is true and this is the equivalent of it in sql
select *
from CategorySubjects
left join Books on CategorySubjects.Id = Books.CategorySubjectId
where Books.Active = 1
Thanks.