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

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -