janjosephlim / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

Feature Request: Composite Entity Deserializer #126

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is kind of like the MultiMap query, except not.

Given the following DTO:

public class Product {
  public int Id { get; set; }
  public string Name { get; set; }
  public Category Category { get; set; }
}

public class Category { 
  public string Name { get; set; }
}

I should be able to write the following SQL query:

SELECT Id, Name, OtherColumn AS "Category.Name", ...

(Notice the usage of the quoted identifier)

The period in the column name is used as a path delimiter. It's a little bit 
different than the MultiMap because the data in the sub-entity (Category in 
this example) doesn't have to belong to a different table.

Original issue reported on code.google.com by joseph.d...@gmail.com on 3 Dec 2012 at 1:58

GoogleCodeExporter commented 8 years ago
I also created a github pull request 
https://github.com/SamSaffron/dapper-dot-net/pull/65

Original comment by joseph.d...@gmail.com on 3 Dec 2012 at 5:21