Is it possible to return multiple result sets using ExecuteQuery in Linq to Sql?

I know that you can return multiple results from a stored procedure and using the method generated by the constructor.

However, I am trying to do the same with ExecuteQuery, but it seems like this is not possible. Did anyone try or know if this is possible?

Basically, I am trying to run a special stored procedure. By ad-hoc, I mean a stored procedure that was not available at design time.

+5
source share
2 answers
+2

, Global.CS, DataSet ,

- .

public DataSet DealClientSearchSelectTest(int ID,int PageIndex, string SearchStr)
{
 try
{
return GlobalCls.ExecuteStoredProcedure("Sp_test " + SectionID + "," + ID + '" + SearchStr + "'");
}
catch (Exception)
{
throw;
}
}
-1

All Articles