One of the most common use cases for SPs that return multiple result sets is that they have a hierarchical relationship. It would be nice if this could be automatically detected, and the child items assigned to a property. For instance, if you have a SP that returns 2 result sets:
Family: LastName, Id
Person: FirstName, Id, FamilyId
You should be able to call a stored proc: new StoredProcedure<Family>()...
and define the models:
public class Family
{
public int Id { get; set; }
public string LastName { get; set; }
public IEnumerable<Person> Members { get; set; }
}
public class Person
{
public int Id { get; set; }
public int FamilyId { get; set; }
public string FirstName { get; set; }
}
It should follow the same conventions as described at this MSDN blog.
One of the most common use cases for SPs that return multiple result sets is that they have a hierarchical relationship. It would be nice if this could be automatically detected, and the child items assigned to a property. For instance, if you have a SP that returns 2 result sets:
You should be able to call a stored proc:
new StoredProcedure<Family>()
...and define the models:
It should follow the same conventions as described at this MSDN blog.