title: Map Stored procedure result to object inside an object
body: <p>If i have a Person class which have Dog class property  :</p>
  
  <pre><code>public class Person{
   public string Name {get;set;}
   public Dog Doggie {get;set;}
  }
  </code></pre>
  
  <p>On a single SP call i want to populate both dog object and person object, but i cant figure out how to do that. </p>
  
  <pre><code>CREATE PROCEDURE Test
   AS
  BEGIN
      SET NOCOUNT ON;
  
      -- Insert statements for procedure here
        SELECT 
          Name                = p.Person_Name,
          Doggie.Name (This fails) = d.Dog_Name
  
        FROM My fancy join......
  END
  GO
  
  
  
    public Person GetByUid(Guid uid)
      {
          Person personToReturn;
  
          using (var connection = this.connectionFactory.GetOpenConnection())
          {
              try
              {
                  personToReturn= connection.Query&lt;Person&gt;("ProcedureName",
                      new {  personUid = uid },
                      commandType: CommandType.StoredProcedure).Single();
              }
              catch ()
              {
                  return null;
              }
  
          }
  
      return personToReturn;
  }
  </code></pre>
  
  <p>Is it possible? </p>