场景:
我有两种语言的语言关键字列表:语言A和语言B。 我想创建一个左外连接,将两个列表连接在一起,并包含on属性:“ Reference”, 也就是说,我想要列出语言A中所有“ LanguageKeywords”的列表,如果该关键字存在于LanguageB中,则分别填充其“ LanguageB”属性值...
public class LanguageKeyword
{
public string Reference { get; set; }
public string LanguageA { get; set; }
public string LanguageB { get; set; }
}
尝试:
var langA = new List<LanguageKeyword2>();
var langB = new List<LanguageKeyword2>();
var fullList = langA.GroupJoin(langB, a => a.Reference, b => b.Reference, (a, b) =>
new LanguageKeyword2()
{
Reference = a.Reference,
LanguageA = a.LanguageA,
LanguageB = ???
});
谢谢!