Reputation: 35
Does Entity Framework Core 1.0 Support multiple result set? If so can you give please give an example based on the below stored procedure?
CREATE PROCEDURE uspGetProductInfo
AS
BEGIN
SELECT ID,PRODUCT_NAME FROM PRODUCT
SELECT ID,CATEGORY_NAME FROM PRODUCT_CATEGORY
END
Upvotes: 0
Views: 757
Reputation: 30425
What kind of support are you looking for? You can certainly drop-down to ADO.NET.
var command = db.Database.GetDbConnection().CreateCommand();
command.CommandText = "uspGetProductInfo";
db.Database.OpenConnection();
try
{
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
// TODO: Read products
}
reader.NextResult();
while (reader.Read())
{
// TODO: Read product categories
}
}
}
finally
{
db.Database.CloseConnection();
}
Upvotes: 2