I currently writing an android app with C#/Xamarin. The App uses a local SQLite Database. There i want to execute a query which is written in the app. The Tables are created through classes like this one:
class TestClass
{
[PrimaryKey, AutoIncrement, Column("id")]
public int Id { get; set; }
[NotNull, Column("messagetext")]
public string MessageText { get; set; }
[Column("messagetype")]
public int MessageType { get; set; }
public TestClass(string mText, int mType)
{
MessageText = mText;
MessageType = mType;
}
}
The Database has multiple Tables.
The function
DBConnection.Execute("this is a query")
only executes the Query. Since I need to get a Result, i should use
DBConnection.Query
but while programming, I don't know what tables the query selects, joins... The Query Function requires a TableMapping or Class.
Is there a way to execute a query and get a result without knowing a tablemapping or something else?
Thanks.