I have two different databases that contain two tables with the exact same design. How do I combine the results from these two queries most efficiently? I know I can put the results of each into a dictionary or array or whatever, but I would like to think that there is a simpler way to do this.
var db1 = //A database object connected to database1
var db2 = //A database object connected to database2
var result1 = db1.table.where(a=>a.value>0);
var result2 = db2.table.where(a=>a.value>0);
var resultSum = result1+result2; //???
Thanks!
Addendum: Concat or Union, which is better for this particular case and why? Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…