Can i use Linq with SQLite if the tables (and table schemas) are generated at runtime?
Let's say I create a random table "MyTable" using a SQL statement ("CREATE TABLE MyTable (col1, col2)"). How can I then use Linq to query that table?
from t in MyTable select t.col1
or perhaps
from t in db["MyTable"] select t("col1")
Perhaps this is no开发者_开发问答t possible.
I guess that what you're looking for is a SQLite data provider for Linq. Basically is a library called System.Data.SQLite that enables you to query SQLite databases using Linq.
EDIT:
Ok, since what you want is LinqToSQL support for SQLite, I will suggest you check this article at CodeProject.com: LinqToSQL: Comprehensive Support for SQLite. It features a full tutorial on the topic.
精彩评论