This question is locked. New answers and comments are not allowed.
I have requirement. I have a stored procedure which returns a result set.The result set is dynamic. So I am unable to create a specific model for the result. I have to generate an Excel from the application based on the Result. I need to call the SP from EntityModel, but can't use a specific model to retrieve data. Right now I am using this code:
But this code basically returns an Object Array, from which I am unable to read the Field/Column name.
Is there a method using which I can get a DataSet which I can easily parse and generate the Excel?
using (EntitiesModel1 ctx = new EntitiesModel1()){Telerik.OpenAccess.SqlParameter pOrderDetailID = new Telerik.OpenAccess.SqlParameter("OrderDetailID", OpenAccessType.Int32);List<Telerik.OpenAccess.SqlParameter> sqlParameters = new List<Telerik.OpenAccess.SqlParameter>() { pOrderDetailID};object queryResult = ctx.ExecuteStoredProcedure<object>("[sp_OrderDetailView]", sqlParameters, orderDetailID);return queryResult;}But this code basically returns an Object Array, from which I am unable to read the Field/Column name.
Is there a method using which I can get a DataSet which I can easily parse and generate the Excel?