3

I'm using SQLite in a Windows 8 application I'm running and was wondering if there was any sort of performance issue between using the following two lines of code:

conn.Table<Chemistry>().Where(ch => ch.case_id == CaseId).ToListAsync();

vs

conn.QueryAsync<Chemistry>("SELECT * FROM Chemistry WHERE Case_Id = ?", CaseId);

They both work and I prefer to use the lambda expression as opposed to the string query. Just wondering if there are any repercussions when doing this.

4

1 回答 1

0

这里这里。要点是,假设等效语句,它们产生相同的 IL,因此性能相同。有一些东西在查询表单中更容易表达。

于 2013-02-23T04:10:41.957 回答