示例#1
0
 /// <summary>
 /// Creates a database by automatically creating a <see cref="SQLiteConnection"/> and a <see cref="SQLiteDatabaseContext"/>
 /// </summary>
 public SqliteDatabase()
 {
     Context = new SQLiteDatabaseContext();
     //Connection = (SQLiteConnection)Context.Database.GetDbConnection();
 }
示例#2
0
 /// <summary>
 /// Creates a database with a <see cref="SQLiteDatabaseContext"/> using the specified <see cref="SQLiteConnection"/>
 /// </summary>
 /// <param name="connection">The connection to use</param>
 public SqliteDatabase(SqliteConnection connection)
 {
     Connection = connection ?? throw new ArgumentNullException(nameof(connection));
     Context    = new SQLiteDatabaseContext(connection);
 }