Exemplo n.º 1
0
        /// <inheritdoc />
        public async Task <IEnumerable <TEntity> > WhereAsync(
            Expression <Func <TEntity, bool> > predicate, CancellationToken cancellation = default(CancellationToken))
        {
            IAsyncStoreContracts.WhereAsync(predicate);

            cancellation.ThrowIfCancellationRequested();
            return(await this.store.WhereAsync(predicate, cancellation).DontMarshallContext());
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public async Task <IEnumerable <TEntity> > WhereAsync <TEntity>(
            Expression <Func <TEntity, bool> > predicate, CancellationToken cancellation = default(CancellationToken))
            where TEntity : class
        {
            IAsyncStoreContracts.WhereAsync(predicate);

            var store = await this.GetStoreAsync <TEntity>(cancellation).DontMarshallContext();

            return(await store.WhereAsync(predicate, cancellation).DontMarshallContext());
        }
        /// <inheritdoc />
        public async Task <IEnumerable <TEntity> > WhereAsync <TEntity>(
            Expression <Func <TEntity, bool> > predicate, CancellationToken cancellation = default(CancellationToken))
            where TEntity : class
        {
            IAsyncStoreContracts.WhereAsync(predicate);

            cancellation.ThrowIfCancellationRequested();
            return(await this.connection.Table <TEntity>()
                   .Where(predicate)
                   .ToListAsync(cancellation)
                   .DontMarshallContext());
        }