public IEnumerable <DynamicTableEntity> ExecuteQuery(TableQuery query, TableRequestOptions requestOptions = null, OperationContext operationContext = null) { var parser = new TableQueryParser(); var filterExpression = parser.CreateFilterExpressionDynamic(query.FilterString).Compile(); return(_entries.Where(filterExpression).AsEnumerable()); }
public IEnumerable <R> ExecuteQuery <TElement, R>(TableQuery <TElement> query, EntityResolver <R> resolver, TableRequestOptions requestOptions = null, OperationContext operationContext = null) where TElement : ITableEntity, new() { var parser = new TableQueryParser(); var filterExpression = parser.CreateFilterExpressionDynamic(query.FilterString).Compile(); return (_entries.Where(filterExpression) .Select(e => resolver(e.PartitionKey, e.RowKey, e.Timestamp, e.Properties, e.ETag)) .AsEnumerable()); }
public IEnumerable <TElement> ExecuteQuery <TElement>(TableQuery <TElement> query, TableRequestOptions requestOptions = null, OperationContext operationContext = null) where TElement : ITableEntity, new() { var parser = new TableQueryParser(); var filterExpression = parser.CreateFilterExpressionDynamic(query.FilterString).Compile(); return(_entries.Where(filterExpression).Select(e => { TElement newTElement = new TElement { ETag = e.ETag, PartitionKey = e.PartitionKey, RowKey = e.RowKey, Timestamp = e.Timestamp, }; newTElement.ReadEntity(e.Properties, operationContext); return newTElement; }).AsEnumerable()); }