public async override Task <IEnumerable <TData> > QueryAsync(ODataQueryOptions query)
        {
            if (query == null)
            {
                throw new ArgumentNullException("query");
            }

            var operation = new TableQuery <TData>();

            // Set selected properties but remove 'ETag' which is not an actual column
            bool           isSelectModified;
            IList <string> properties = this.Request.SetSelectedProperties(typeof(TData), this.systemPropertyMap, out isSelectModified);

            properties.Remove("ETag");
            operation.SelectColumns = properties;

            var context = new ODataQueryContext(this.GetEdmModel(), typeof(TData));

            query = new ODataQueryOptions(context, this.Request);

            try
            {
                query.Validate(this.validationSettings);
            }
            catch (ODataException e)
            {
                HttpResponseMessage badQuery = this.Request.CreateBadRequestResponse(ASResources.DomainManager_InvalidQueryUri.FormatForUser(e.Message));
                throw new HttpResponseException(badQuery);
            }

            // Apply any filter provided to the query
            if (query.Filter != null && !string.IsNullOrEmpty(query.Filter.RawValue))
            {
                string filterString = ReplaceDateTimeOffsetWithDateTime(query.Filter.RawValue);
                if (this.IncludeDeleted)
                {
                    operation.FilterString = filterString;
                }
                else
                {
                    operation.FilterString = String.Format(CultureInfo.InvariantCulture, "({0}) and ({1})", filterString, ExcludeDeletedFilter);
                }
            }
            else if (!this.IncludeDeleted)
            {
                operation.FilterString = ExcludeDeletedFilter;
            }

            // Apply the max result size for this query
            int resultSize = TableUtils.GetResultSize(query, this.querySettings);

            operation.TakeCount = resultSize;

            return(await this.ExecuteQueryAsync(operation, resultSize));
        }