سلام استاد وقت بخیر
دلیل اینکه لیست محصول ها خالی هست به خاطر اینه که ما موقع ثبت محصول سطح سوم دسته بندی رو ثبت کردیم در حالی که اینجا سطح اول رو میخوایم پس متود GetProductsBySlug میتونیم به این شکل اصلاح کنیم:
public async Task<IEnumerable<Product>> GetProductsBySlug(string slug)
{
return _context.Products
.Include(p => p.Category.Parent.Parent)
.Where(p=>p.Category.Parent.Parent.Slug == slug && !p.IsDelete)
.AsQueryable();
}