我有两个名为的数据表dtPayments
,dtRecieptsNew
我需要在 linq to sql 中执行完全外连接。
我正在尝试:
var commonColumns = dtPayments.Columns.OfType<DataColumn>().Intersect(
dtRecieptsNew.Columns.OfType<DataColumn>(),
new DataColumnComparer()
);
DataTable result = new DataTable();
dtPayments.PrimaryKey = commonColumns.ToArray();
result.Merge(dtPayments, false, MissingSchemaAction.AddWithKey);
result.Merge(dtRecieptsNew, false, MissingSchemaAction.AddWithKey);
但我收到了这个错误:The type or namespace name 'DataColumnComparer' could not be found (are you missing a using directive or an assereferrence
你能给出任何想法吗?
感谢您。桑托什·斯里尼瓦斯.g