Hi
I’m Using Dreamfactory with .Net MVC, I’m wondering if it is possible to fetch master - detail records by stored procedure.
for instance I’m having a Customer table with fields
- CustomerID
2.CustomerName
Address table with field
- AddressID
- CustomerID
- Address
One customer can have multiple address.
Any help???
Thanks
Multiple result sets are not supported.
You can achieve what you want by either splitting into 2 stored procedures or returning an entity that contains both customer and address data thus having duplicate customers in the result set. You can then group the results by customerID in C# if necessary.
Regards
Marko
Is it possible to achieve the same by using related queries?
Yes, of course. Have a look at the .NET SDK github repo, it has a AddressBookDemo that demonstrates related queries.
Regards
Marko