I have a stored proc that returns multiple rows which the following columns:
Guid,
Guid,
Name,
Guid,
Description
The first Guid
column is always the same for all the rows. So I created the following classes:
public class Header
{
public Guid Guid { get; set; }
public string Name { get; set; }
}
public class Content
{
public Guid Guid { get; set; }
public string Description { get; set; }
}
public class Result
{
public Guid Guid { get; set; }
public IEnumerable<Header> Headers { get; set; }
public IEnumerable<Content> Content { get; set; }
}
And to get the reults I'm trying to do:
var result connection.Query<Guid, Header, Content>("myproc",
new { criteria },
commandType: CommandType.StoredProcedure,
map: ,
splitOn: "Guid").AsList();
But what should I do in the map
parameter to split the results into the objects?