Create Procedure spAbc
as
begin
select a,b,c from table1
select x,y,z from table2
end
how to to get all table record of spAbc procedure...entity framework return only zero index table.
using (HeplConnection objHeplConnection = new HeplConnection())
{ var obj = objHeplConnection.StaffRegistration_DDL();foreach (var item in obj.table1)
{table1 objtable1 = new table1 ();
}
foreach (var item in obj.table2){table2 objtable2 = new table2 ();}
}
Ramesh MaruthiPosted Sep 30, 2014, 11:45 AM
Do in this way :
1) Create the command
var cmd = Database.Connection.CreateCommand();
2) Call the stored proc
cmd.CommandText = "[dbo].[spAbc ] ";
3) Execute the stored proc using ExecuteReader
var reader = cmd.ExecuteReader();
reader consists of complete result so for getting the second table result you can use
reader.NextResult();