Skip to content

Contains 转换为 in ()

tagsFilter.Or(a => a.VillagePopulation.Extras.AsQueryable().Any(c => tags.Contains(c.Key)));

AND `v1`.`Key` IN ('1020001', '1020015', '1020016', '1020002', '1020003'))))

Any 转换为 exists

tagsFilter.Or(a => a.VillagePopulation.Extras.AsQueryable().Any(c => tags.Contains(c.Key)));

 AND EXISTS (
    SELECT 1
    FROM `VillagePopulationExtra` AS `v1`
    WHERE (NOT (`v1`.`IsDeleted`) AND (`t`.`Id` = `v1`.`VillagePopulationId`))