I am using C#
, and I try to create a table, using ServiceStack.OrmLite
, corresponding to a class type created in run-time, I searched for the topic and I have found the following solution:
After creating the type in
runtime (employeeType)
, I could do the following:db.CreateTableIfNotExists(employeeType);
This would create the table Employee corresponding to the (dynamically created type "Employee")
Then, by using the following:
var typedApi = db.CreateTypedApi(employeeType);
I could get a TypedApi which could be used to insert, delete, update the Employee table created dynamically.
In fact, my problem is that I cannot make a simple select statement from the table "Employee" because that requires to pass a generic
type T
which I don't have, as follows:db.Select<T>(); // T is supposed to be my "employeeType" created dynamically.
Is it possible to make a select from a table corresponding to a run-time created type ?
Thank you for your help !