I\'m currently working with a project that use following technologies.
Julie Lerman explains this very well in some video's
There are not many option to solve it. EF doesn't have any direct support for updating disconnected object graphs. You must code your update logic and there are generally two ways how to do it:
ChangeTracker
for every received entity.Is your issue now that you use EF and it makes lots of calls for updates? I don't see a way around that here as your phone numbers and emails are separate tables. You could create a flattened entity for the user that contains ex five of each and map to a proc for your insert. It would reduce calls but not the cleanest IMHO. If you are processing many users at once then maybe breakup the UOW to act per user only so you have shorter transactions. Is there currently a performance issue or just a future concern? –
Without flattening you are in no different of a scenario than without using EF. I don't understand why thought because you are using DDD you can't introduce entities specific to data mappings.Your Entities can still be used, you just in addition have a new entity with mappings. In fact you can do this without entities in your repository later (repository queries changed objects, flattens and sends to data access layer to call proc)