SQLite.net を使用して PCL 内に OneToMany 関係を実装しようとしています。私は非同期拡張パッケージ (SQLiteNetExtensions.Async) を持っており、https://bitbucket.org/twincoders/sqlite-net-extensions にある例に基づいてコードを作成してい ます。SQLiteAsyncConnection を使用していますが、UpdateWithChildren メソッドは使用できないようです。SQLiteConnection でのみ使用できます。
using SQLite.Net;
using SQLite.Net.Async;
using SQLite.Net.Interop;
using SQLiteNetExtensions.Extensions;
private readonly SQLiteAsyncConnection conn;
public ActivityRepository(ISQLitePlatform platform, string dbPath)
{
var connectionFactory = new Func<SQLiteConnectionWithLock>(() => new SQLiteConnectionWithLock(platform, new SQLiteConnectionString(dbPath, storeDateTimeAsTicks: true)));
conn = new SQLiteAsyncConnection(connectionFactory);
}
public void method(object object) {
conn.UpdateWithChildren(object); --function not available
}