The SQLiteGateway class is a data adapter class which makes it easier to select, insert, update and delete
data from the database.
Notes: System.Data.SQLite doesn't like:
- SingleOrDefault -- replaced with FirstOrDefault.
- compare database varchar to Guid.ToString() -- need to cast guid into string before using value in LIN
Declaration Syntax
C# | Visual Basic |
public class SQLiteGateway
Public Class SQLiteGateway
Members
All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
SQLiteGateway(String) |
Default constructor for the SQLiteGateway class.
| |
CloseConnection()()()() |
Closes the database connection.
Raises an exception if the connection cannot be closed.
| |
CompactDatabase()()()() |
Compacts the database.
| |
CreateDatabaseFile(String) |
Creates a new database file.
| |
DatabaseFilePath |
Database file path.
| |
Delete(String, String, Guid) |
Deletes an item from the database.
| |
Delete(String) |
Deletes all rows from a database table.
| |
Delete(String, String) |
Deletes all rows from a database table using the specified Where clause.
| |
Equals(Object) | (Inherited from Object.) | |
Execute(String) |
Executes a SQL query and returns the number of rows affected.
| |
ExecuteScalar(String) |
Executes a scalar SQL query and returns the query value.
| |
Finalize()()()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType()()()() | Gets the Type of the current instance. (Inherited from Object.) | |
Insert(String, String, Object) |
Inserts an item into the database.
| |
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OpenConnection()()()() |
Opens the database connection.
Raises an exception if the connection cannot be opened.
| |
Select(String) |
Executes a select query and returns a DataTable object.
| |
ToString()()()() | (Inherited from Object.) | |
Update(String, String, Guid, Object) |
Updates an item in the database.
| |
UpdateDataTable(DataTable, String) |
Updates a DataTable into the database (useful for insert/update/delete).
| |
UpdateDataTableTransaction(DataTable, String) |
Updates a DataTable into the database using a transaction (useful for insert/update/delete).
|
Inheritance Hierarchy
Object | ||
SQLiteGateway | ||
MPfmGateway |