【发布时间】:2013-05-07 20:32:28
【问题描述】:
我有一个带有内容对象的列表 (List<Content>)。在 Content 对象中,我有 4 个字段。
ContentID
ModifiedDate
Description
HtmlMarkup
我有两个List<Content>,我需要通过 ContentID(两个不同的数据库)进行比较,看看是否有任何字段具有不同的值,然后我需要获取哪些字段不同。
假设我有对象 A
ContentID - 1
ModifiedDate - 1/1/2013
Description - "This is my first content class"
HtmlMarkup - "<b>First Content</b>
对象 B
ContentID - 1 -- these are from two different databases, so contentID will match
ModifiedDate - 1/1/2013
Description - "This is a description"
HtmlMarkup - "<b>Test</b>
我应该通过 ContentID 比较它们。在此示例中,我将返回 ContentID 1 的 Description 和 HtmlMarkup 不同。如果 ContentID 不匹配(意味着它已被删除或不在第二个数据库中),我也想抓住它。我该怎么做?
【问题讨论】:
-
...问题是?
-
您的问题在哪里,您的代码在哪里?这看起来像是一个功能请求。
-
几乎看起来你只想使用table comparison tool。