Exemple #1
0
 /// <summary>
 /// Gets the first or default document.
 /// </summary>
 /// <returns>The first document.</returns>
 /// <param name="query">Query.</param>
 public async Task <T> GetFirstOrDefaultAsync(SqlQuerySpec query = null)
 {
     return(await _repository.GetFirstOrDefaultHelperAsync(new SqlQuerySpecQuery <T>(query)).ConfigureAwait(false));
 }
Exemple #2
0
 /// <summary>
 /// Gets the first or default document.
 /// </summary>
 /// <param name="query">Query.</param>
 /// <param name="feedOptions">Feed options.</param>
 /// <returns>The first document.</returns>
 public Task <T> GetFirstOrDefaultAsync(SqlQuerySpec query = null, FeedOptions feedOptions = null)
 {
     return(_repository.GetFirstOrDefaultHelperAsync(new SqlQuerySpecQuery <T>(query), feedOptions));
 }