title: Mapping one DTO to multiple entities
body: <p>I have the DB model like the following. Here I describe entities I have in the EF model:</p>
  
  <pre><code>   public class Person
     {
        public int Id { get; set; }
        public int AddressId { get; set; }
        public int RoleId { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
     }
  
     public class Address
     {
        public int Id { get; set; }
        public int CountryId { get;set; }
        public string City { get; set; }
     }
  
     public class Role
     {
        public int Id { get; set; }
        public string Name { get; set; }
     }
  
     public class Country
     {
        public int Id { get; set; }
        public string Name { get; set; }
     }
  </code></pre>
  
  <p>On the front end I have the management interface allowing to edit the user info.
  So, in each of the grid lines I show the following DTO object:</p>
  
  <pre><code>   public class SystemUser
     {
        public string UserName { get; set; }
        public string Email { get; set; }
        public string City { get; set; }
        public string Country { get; set; }
        public string Role { get; set; }
     }
  </code></pre>
  
  <p>The main question I have - what is the best way of mapping this back to the entities after edit was performed and I get the DTO back with AutoMapper or something else?</p>
  
  <p>Or am I doing something completely stupid here?</p>
  
  <p>Edit:
  There is also another challenge I have: I would like to minimize round trips to the DB.</p>