comparison key.

hemantgaurhemantgaur Posts: 27
is there a way to figure out which columns are going to be used for comparison, preferably in selectiondelegate implementation?

I am sure it must be stored somewhere before even comparison begins, i guess I am asking how do i access it runtime?

Thank you very much.


  • Brian DonahueBrian Donahue Posts: 6,590 New member

    If I understand you correctly, what you want to do is create a set of default mappings, then loop through each TableMapping and check the "Include" property on it, and in each of these loop through all of its' FieldMappings and see if they have the "Include" property set to true.

    If a column could not be mapped, the "Include" property will be set to "false".
  • I am sorry. I should have been more clear. I meant primary key. What I meant to ask is out of all the columns that I am comparing what amongst those are the part of the primary key.

    Thank you.
  • Brian DonahueBrian Donahue Posts: 6,590 New member

    Each TableMapping has a MatchingMappings property -- this is a collection of Fields that make up the comparison key, whether the mapping was created automatically or you created it yourself.
Sign In or Register to comment.