Last active
December 16, 2015 14:10
-
-
Save jameshulse/feae2c0db83f9a32fb2d to your computer and use it in GitHub Desktop.
Example Automapper API to determine changes made from mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var person = new Person(name: "James", age: 27); | |
var update = new PersonUpdate { age = 28 }; | |
var changes = Map.MapWithChanges(update, person); // Theoretical API | |
if(changes.Any()) | |
_db.Save(person); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As opposed to: