Obtain data from db.Query<T> as IQuerable<object>
Posted: Tue 27 Oct 2020 13:14
Hello!
I have queries wich are generated for many pages with different classes by the custom builder. That's why I want to execute a query directly with any type. How can I do it in dotConnect for Oracle 9.13.1098.0?
For example, for query "select name, id from test"
I have to create the class
and execute the code
But I have many queries and classes and there is no opportunity to create all classes in C#.
How can I execute this query and obtain the result as IQuerable<object>?
Note that after using
I have IQuerable<object> but in the item there is no any data.
I have queries wich are generated for many pages with different classes by the custom builder. That's why I want to execute a query directly with any type. How can I do it in dotConnect for Oracle 9.13.1098.0?
For example, for query "select name, id from test"
I have to create the class
Code: Select all
public class TestName
{
public string name {get; set;}
public int id {get;set;}
}
Code: Select all
var query = db.Query<TestName>("select name, id from test")
How can I execute this query and obtain the result as IQuerable<object>?
Note that after using
Code: Select all
var query = db.Query<object>("select name, id from test")