I'm trying to use the new function Filtered on Include but I'm not getting it right somehow. https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-5.0/whatsnew#preview-3
I got a product with categories. I need to filter Products on Category title/name. It's a many to many relations.
The category title should contain "Vlees". But somehow ALL 6 products in the database get returned, even with the wrong Category.Title name.
var products = await _context.Product
.Include(c => c.ProductCategories.Where(c => c.Category.Title.Contains(containsTitle)))
.ThenInclude(c => c.Category)
.ToListAsync();
