I have two collections returned from Dapper Query
Table1_Collection = Query<dynamic>("SELECT * FROM Table1"); // I can make Select T1, *
Table2_Collection = Query<dynamic>("SELECT * FROM Table2"); // I can make Select T1, *
See comment above I can just fix it with adding Select T1 with query. but how to do that in .NET Collections.
Now I need to merge both Collections:
List<dynamic>CombinedCollection = new List<dynamic>();
CombinedCollection.AddRange(Table1_Collection);
CombinedCollection.AddRange(Table2_Collection);
Above collection contains columns in both table1 and table2. I need to add a field to that collection in .NET to specify which table that row belongs.
Something Like:
CombinedCollections.AddRange(Table1_Collections).CombineWith("T1");
CombinedCollections.AddRange(Table2_Collections).CombineWith("T2");
Note that for DataTables, It have Columns.Add(DataColumn) with default value. But in Dapper its only .NET Collections...