Lambda表达式用于过滤包含的实体

时间:2017-08-21 10:05:59

标签: c# linq lambda entity-framework-core

我有这个查询,

var productCategories = _dbContext
   .Set<ProductCategory>()
   .Include(x => x.ProductInCategories)
   .ThenInclude(x => x.Product)
   .ThenInclude(x => x.ProductMetadatas)
   .Where(x => x.Active)
   .ToList();

但是,我无法在此查询中过滤产品。我只想要有效产品。任何帮助将不胜感激。

0 个答案:

没有答案
相关问题