automapper - simplest option to only write to destination property if the source property is different?
NOTE: The scenario is using 2 entity framework models to sync data between 2 databases, but I'd imagine this is applicable to other scenarios.  One could try tackling this on the EF side as well (like in [this SO question](http://stackoverflow.com/questions/463799/entity-framework-cancel-a-property-change-if-no-change-in-value)) but I wanted to see if AutoMapper could handle it out-of-the-box

I'm trying to figure out if AutoMapper can (easily :) compare the source and dest values (when using it to sync to an existing object) and do the copy only if the values are different (based on Equals by default, potentially passing in a Func<TSource, TDest, bool>, like if I decided to do String.Equals with StringComparison.OrdinalIgnoreCase for some particular pair of values).  At least for my scenario, I'm fine if it's restricted to just the TSource == TDest case (I'll be syncing over int's, string's, etc, so I don't think I'll need any type converters involved)

Looking through the samples and tests, the closest thing seems to be conditional mapping (src\UnitTests\ConditionalMapping.cs), and I would use the Condition overload that takes the Func<ResolutionContext, bool> (since the other overload isn't sufficient, as we need the dest information too).  That certainly looks on the surface like it would work fine (I haven't actually used it yet), but I would end up with specifying this for every member (although I'm guessing I could define a small number of actions/methods and at least reuse them instead of having N different lambdas).

Is this the simplest available route (outside of changing AutoMapper) for getting a 'only copy if source and dest values are different' or is there another way I'm not seeing?  If it *is* the simplest route, has this already been done before elsewhere?  It certainly feels like I'm likely reinventing a wheel here. :)
automapper - simplest option to only write to destination property if the source property is different?
===

NOTE: The scenario is using 2 entity framework models to sync data between 2 databases, but I'd imagine this is applicable to other scenarios.  One could try tackling this on the EF side as well (like in [this SO question](http://stackoverflow.com/questions/463799/entity-framework-cancel-a-property-change-if-no-change-in-value)) but I wanted to see if AutoMapper could handle it out-of-the-box

I'm trying to figure out if AutoMapper can (easily :) compare the source and dest values (when using it to sync to an existing object) and do the copy only if the values are different (based on Equals by default, potentially passing in a Func<TSource, TDest, bool>, like if I decided to do String.Equals with StringComparison.OrdinalIgnoreCase for some particular pair of values).  At least for my scenario, I'm fine if it's restricted to just the TSource == TDest case (I'll be syncing over int's, string's, etc, so I don't think I'll need any type converters involved)

Looking through the samples and tests, the closest thing seems to be conditional mapping (src\UnitTests\ConditionalMapping.cs), and I would use the Condition overload that takes the Func<ResolutionContext, bool> (since the other overload isn't sufficient, as we need the dest information too).  That certainly looks on the surface like it would work fine (I haven't actually used it yet), but I would end up with specifying this for every member (although I'm guessing I could define a small number of actions/methods and at least reuse them instead of having N different lambdas).

Is this the simplest available route (outside of changing AutoMapper) for getting a 'only copy if source and dest values are different' or is there another way I'm not seeing?  If it *is* the simplest route, has this already been done before elsewhere?  It certainly feels like I'm likely reinventing a wheel here. :)