/// <summary> /// /// </summary> /// <typeparam name="T1"></typeparam> /// <typeparam name="T2"></typeparam> /// <typeparam name="T3"></typeparam> /// <returns></returns> public Dictionary <string, List <ITable> > Execute <T1, T2, T3>() where T1 : class, ITable, new() where T2 : class, ITable, new() where T3 : class, ITable, new() { Dictionary <string, List <ITable> > result = new Dictionary <string, List <ITable> >(); try { Connection.Open(); var reader = Command.ExecuteReader(); List <ITable> data = new List <ITable>(); while (reader.Read()) { T1 t = new T1(); t.Parse(reader); data.Add(t); } result.Add(typeof(T1).Name, data); if (reader.NextResult()) { List <ITable> data2 = new List <ITable>(); while (reader.Read()) { T2 s = new T2(); s.Parse(reader); data2.Add(s); } result.Add(typeof(T2).Name, data2); } if (reader.NextResult()) { List <ITable> data3 = new List <ITable>(); while (reader.Read()) { T3 k = new T3(); k.Parse(reader); data3.Add(k); } result.Add(typeof(T3).Name, data3); } } finally { Connection.Close(); } return(result); }