I have faced this issue many times and I wanted to know the best approach to deal with Where clause in Include. Here is my sample code
IEnumerable<Data.StoreMenu> dataStoreMenus = _context.StoreMenus
.Include(sm => sm.MenuCategories.Where(x => !x.IsDeleted))
.Where(sm => sm.StoreId == storeId && !sm.IsDeleted).ToList();
The scenario is I have a menu and Menu has multiple menu categories. Both menu and menu categories has a flag to mark items deleted. Now I want to retrieve only non-deleted menu along with NON-DELETED menu categories.