Esempio n. 1
0
        /// <summary>
        /// Gets all documents.
        /// </summary>
        /// <returns>The documents.</returns>
        public async Task <IList <T> > GetAllAsync()
        {
            var query = new SqlQuerySpecQuery <T>();
            var sq    = query.ToGetAll();

            return(await _repository.GetListHelperAsync(new SqlQuerySpecQuery <T>(sq)).ConfigureAwait(false));
        }
Esempio n. 2
0
        /// <summary>
        /// Gets all documents.
        /// </summary>
        /// <param name="feedOptions">Feed options.</param>
        /// <returns>The documents.</returns>
        public Task <IList <T> > GetAllAsync(FeedOptions feedOptions = null)
        {
            var query = new SqlQuerySpecQuery <T>();
            var sq    = query.ToGetAll();

            return(_repository.GetListHelperAsync(new SqlQuerySpecQuery <T>(sq), feedOptions));
        }
Esempio n. 3
0
        /// <summary>
        /// Gets all documents.
        /// </summary>
        /// <returns>The documents.</returns>
        private async Task<IList<dynamic>> GetAllAsync()
        {
            var query = new SqlQuerySpecQuery<dynamic>();
            var sq = query.ToGetAll();

            return await _repository.GetListHelperAsync(new SqlQuerySpecQuery<dynamic>(sq)).ConfigureAwait(false);
        }
Esempio n. 4
0
        /// <summary>
        /// Get list of all entities from query.
        /// </summary>
        public async Task <List <T> > GetAllAsync()
        {
            var query = new SqlQuerySpecQuery <T>();
            var sq    = query.ToGetAll().ToSqlQuery();
            var q     = _connection.Client.CreateDocumentQuery <T>(UriFactory.CreateDocumentCollectionUri(_connection.DatabaseId, _connection.CollectionId), sq).AsDocumentQuery();

            var response = await Core.ExecuteWithRetriesAsync(() => QueryMoreDocumentsAsync(q));

            return(response);
        }