SQLite Join in Windows 8 Metro C# with sqlite-net

前端 未结 2 573
失恋的感觉
失恋的感觉 2021-01-19 00:43

I am using C# and SQLite for a Database for a Windows-8-Metro-App. I want to use a Join-Command, but don\'t know how to read the given back data. This will not work:

2条回答
  •  执念已碎
    2021-01-19 01:28

    I was able to use it properly, you can try.

     var db = new SQLiteAsyncConnection(_dbPath);
     var query = from person in await db.Table().ToListAsync()
                        join job in await db.Table().ToListAsync()
                        on person.JobID = job.ID
                        select new
                        {
                            Name=person.Name
                        };
    

提交回复
热议问题