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

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -