I'm sorry if the subject is a bit unclear, but I'm running into a situation where AutoMapper seems to create an empty object of the destination type instead of simply setting null when the source property is null. The code in question is in
https://github.com/cubikca/Bookstore.git.
I refer to AddressAndLocationTests, TestRemove() in Bookstore.Services.People.Tests. I can verify that the database is correctly reflecting a deleted address, and if I follow along in the debugger, I can see that the related property is also null. But for some reason, when mapping it to the domain object, an empty Address object materializes! Can anyone suggest a reason that this empty object is popping into existence instead of simply being null?
Thanks,
Brian