1

I have this:

public class Item1 {
    public string Value1;
    public string Value2;
}


public class Item2: Item1 {
    public string Value3;
}

I want to query two stored procedures, one returns Value1 and Value2, and the other returns Value3. I'm doing it but what I get is a Item1 object and an Item2 object.

Is there a way that I can query the two stored procedures and combine the result in a single Item2 object?

Escobar5
  • 3,941
  • 8
  • 39
  • 62

1 Answers1

0

Write both the query in same procedure like
select value1,value2 from table1 select value3 from table1

Accept Result in dataset instead of datatable

DataSet ds=new DataSet();
Adp.Fill(ds);
    ds.Tables[0].Rows[0]["Value1"].ToString();
    ds.Tables[0].Rows[0]["Value2"].ToString();
    ds.Tables[1].Rows[0]["Value3"].ToString();
VISHMAY
  • 699
  • 5
  • 20