c# - Retreive data with simple.data from a table with its name passed in as a variable? -
is possible query table simple.data has table name passed in somewhere else.
for example:
string tabletouse = "mytable"; var test = db.tabletouse.all();
yes, can use string indexer object names instead of dynamic properties:
string tabletouse = "mytable"; var test = db[tabletouse].all();
that works column names too, can this:
var table = "mytable"; var keycolumn = "id"; int id = 42; var entity = db[table].find(db[table][keycolumn] == id);
Comments
Post a Comment