Join SQLite into embedded database tables

I am currently writing a Windows Store app for Windows 8, and I am using SQLite to save to the built-in database in the class library for Windows applications. I am trying to combine data from two different tables in an embedded database, but SQLite continues to throw an unsupported exception from its GenerateCommand method.

I currently have data in both tables, and they both have a question in each table to join. I tried two different methods that threw the same error.

First method:

    var q = (from gameTable in db.Table<Model.GameSaved>()
                 join qTable in db.Table<Questions>() on gameTable.QuestionId equals qTable.QuestionId
                 select qTable
                ).First();

Second method:

    var q =
                (from question in db.Table<Model.GameSaved>()
                 select question
                ).Join(db.Table<Questions>(), 
                       game => game.QuestionId, 
                       questionObject => questionObject.QuestionId,
                       (game,questionObject) => questionObject)
                 .First();

I'm not quite sure what I am missing here, but it should be something simple and obvious.

+5
source share
1

. linq Sqlite-net. , SQL Query. :

var q = db.Query<Questions>(
    "select Q.* from Questions Q inner join GameSaved G"
    + " on Q.QuestionId = G.QuestionId"
).First();

, Query . Sqlite-net readme:

db.Query<Val>(
    "select 'Price' as 'Money', 'Time' as 'Date' from Valuation where StockId = ?",
     stock.Id);
+10

All Articles