public Task <T> FindAsync <T>(object pk) where T : new() { if (pk == null) { throw new ArgumentNullException("pk"); } return(Task.Factory.StartNew(() => { SQLiteConnectionWithLock conn = GetConnection(); using (conn.Lock()) { return conn.Find <T>(pk); } }, CancellationToken.None, _taskCreationOptions, _taskScheduler ?? TaskScheduler.Default)); }
public Task <T> FindAsync <T>(Expression <Func <T, bool> > predicate) where T : new() { if (predicate == null) { throw new ArgumentNullException("predicate"); } return(_taskFactory.StartNew(() => { SQLiteConnectionWithLock conn = GetConnection(); using (conn.Lock()) { return conn.Find(predicate); } })); }
public Task <T> FindAsync <T>(Expression <Func <T, bool> > predicate) where T : new() { if (predicate == null) { throw new ArgumentNullException("predicate"); } return(Task.Factory.StartNew(() => { SQLiteConnectionWithLock conn = GetConnection(); using (conn.Lock()) { return conn.Find(predicate); } }, CancellationToken.None, _taskCreationOptions, _taskScheduler ?? TaskScheduler.Default)); }
public Task <T> FindAsync <T>(object pk) where T : new() { if (pk == null) { throw new ArgumentNullException("pk"); } return(_taskFactory.StartNew(() => { SQLiteConnectionWithLock conn = GetConnection(); using (conn.Lock()) { return conn.Find <T>(pk); } })); }