src/TableAccess.cs
/// <summary>
/// Find the first row that has a given property value.
/// </summary>
/// <param name="rowKey">the row key.</param>
/// <param name="propertyName">the property to search on.</param>
/// <param name="propertyValue">the value of the property.</param>
/// <returns>A <see cref="Task{TResult}"/> representing the result of the asynchronous operation.</returns>
Find the first row that has a given property value.
Find the first row that has a given property value .
public virtual async Task<T> FindFirstRowWithProperty(string rowKey, string propertyName, string propertyValue)
        {
            if (string.IsNullOrWhiteSpace(rowKey) || string.IsNullOrWhiteSpace(propertyName) || string.IsNullOrWhiteSpace(propertyValue))
            {
                return null;
            }
            await this.CreateIfNotExists();
            var filter = TableQuery.CombineFilters(
                TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.Equal, rowKey),
                TableOperators.And,
                TableQuery.GenerateFilterCondition(propertyName, QueryComparisons.Equal, propertyValue));
            TableQuery<T> query = new TableQuery<T>().Where(filter);
            var stuffs = await this.CloudTable.ExecuteQuerySegmentedAsync<T>(query, new TableContinuationToken());
            T found = null;
            foreach (T thing in stuffs.Results)
            {
                found = thing;
                break;
            }
            return found;
        }
public virtual async Task < T > FindFirstRowWithProperty ( string rowKey , string propertyName , string propertyValue ) { if ( string . IsNullOrWhiteSpace ( rowKey ) || string . IsNullOrWhiteSpace ( propertyName ) || string . IsNullOrWhiteSpace ( propertyValue ) ) { return null ; } await this . CreateIfNotExists ( ) ; var filter = TableQuery . CombineFilters ( TableQuery . GenerateFilterCondition ( " " , QueryComparisons . Equal , rowKey ) , TableOperators . And , TableQuery . GenerateFilterCondition ( propertyName , QueryComparisons . Equal , propertyValue ) ) ; TableQuery < T > query = new TableQuery < T > ( ) . Where ( filter ) ; var stuffs = await this . CloudTable . ExecuteQuerySegmentedAsync < T > ( query , new TableContinuationToken ( ) ) ; T found = null ; foreach ( T thing in stuffs . Results ) { found = thing ; break ; } return found ; }
Find the first row that has a given property value.
Find the first row that has a given property value .
A  representing the result of the asynchronous operation.
A representing the result of the asynchronous operation .
rowKey
string
the row key.
the row key .
propertyName
string
the property to search on.
the property to search on .
propertyValue
string
the value of the property.
the value of the property .