我写了一个这样的查询:
context.PageGroupLangsInSettings
.Where(x => x.PageGroupLang.Language.CaltureId == langCaltureId && x.PageGroupLang.PageGroup.Id == pageGroupId)
.Select(x => new { x.Key, x.Value, Order = 0 })
.Union(
context.PageGroupSavedSettingDetails
.Where(x => x.PageGroupSavedSettings.PageGroupLangs
.Where(y => y.Language.CaltureId == langCaltureId && y.PageGroup.Id == pageGroupId).Any())
.Select(x => new { x.Key, x.Value, Order = 1 })
).ToList()
现在我想使用 IEqualityCompare 相互比较“关键”字段,但我不知道该怎么做。谢谢 :)