The Hxj. Data (V1.3) component adds support for the Sqlite database. Download the latest version
And the entity generation tool (V1.3) also released to support the entity generation of the Sqlite database.
To use Sqlite for database development, you must reference Hxj. Data, Hxj. Data. Sqlite, and System. Data. SQLite.
Config configuration database connection 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 ();
In this way, 100 pieces of data are added in batches.
For other operations, see the previous sections.