The Hxj.data (V1.3) component adds support for the SQLite database.
And the Entity Generation Tool also publishes (V1.3) versions that support entity generation for SQLite databases.
Using Sqlite database development, you need to refer to the three DLLs Hxj.data, Hxj.Data.Sqlite, System.Data.SQLite.
Config metabase connection for example:
<add name= "sqliteconnectionstring" connectionstring= "Data source=c:\sqldb.db" providername= "System.Data.SQLite" />
Sample code:
DbSession session = new Hxj.Data.DbSession("SqliteConnectionString");
Using (Hxj.Data.DbBatch batch = session.BeginBatchConnection())
{
For (int i = 0; i < 100; i++)
{
Test t = new test();
T.s = "test" + i.ToString();
batch.Insert<test>(t);
}
}
GridView1.DataSource = session.From<test>().ToList();
GridView1.DataBind();
This completes the batch to add 100 piece of data.