xy.Db.SQLite64
1.0.5
dotnet add package xy.Db.SQLite64 --version 1.0.5
NuGet\Install-Package xy.Db.SQLite64 -Version 1.0.5
<PackageReference Include="xy.Db.SQLite64" Version="1.0.5" />
<PackageVersion Include="xy.Db.SQLite64" Version="1.0.5" />
<PackageReference Include="xy.Db.SQLite64" />
paket add xy.Db.SQLite64 --version 1.0.5
#r "nuget: xy.Db.SQLite64, 1.0.5"
#:package xy.Db.SQLite64@1.0.5
#addin nuget:?package=xy.Db.SQLite64&version=1.0.5
#tool nuget:?package=xy.Db.SQLite64&version=1.0.5
xy Db SQLite64 Implement
xy.Db is a definition of general database operation interface and implementation of specific database operations for each database, Currently includes: SQLite64, PostgreSQL, SqlServer, MySql
This project is a SQLite64 implementation of xy.Db.
Sample
Please read code details in project xyDbSample.
Create DbService
IDbAccess dbAccess = new SQLite64DbAccess();
string ConnectionString = @"Data Source=testDb;";
DbService = new DbService(ConnectionString, dbAccess);
await DbService.openAsync();
New record and query
maxId++;
string sql = "INSERT INTO COMPANY(ID, NAME, AGE) " + "VALUES(" + maxId + ", '', 0)";
await dbService.exeSqlAsync(sql);
sql = "SELECT * From COMPANY WHERE ID=" + maxId;
DataTable dt = await dbService.exeSqlForDataSetAsync(sql);
int i = dataGridView1.Rows.Add(dt.Rows[0].ItemArray);
dataGridView1.Rows[i].Tag = dt.Rows[0];
Edit record
string colName = dataGridView1.Columns[e.ColumnIndex].Name;
string cellValue = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
string rowID = dataGridView1.Rows[e.RowIndex].Cells["ID"].Value.ToString();
string sql = "UPDATE COMPANY SET " + colName + "='" + cellValue + "' " + " WHERE ID=" + rowID;
await dbService.exeSqlAsync(sql);
Delete record
int rowIndex = dataGridView1.SelectedRows[0].Index;
int rowID = Convert.ToInt32(dataGridView1.Rows[rowIndex].Cells["ID"].Value);
string sql = "DELETE FROM COMPANY " + " WHERE ID=" + rowID;
await dbService.exeSqlAsync(sql);
dataGridView1.Rows.RemoveAt(rowIndex);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Data.Sqlite (>= 9.0.4)
- System.Data.SQLite (>= 1.0.119)
- xy.Db (>= 1.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.