I basically have two different databases that have different tables in them, but they both have "Table1" with the exact same structure.
var db = new ???;
if(mode == "PRODUCTION"){
db = new Database1("Connection string for Database1");
}
else{
db = new Database2("Connection string for Database2");
}
var result = db.Table1.Where(a=>a.Value==1).First();
How can I make the above work so I can assign "result" from two different databases (depending on "mode") without writing two different definitions for "result"?
Database1andDatabase2?