private IQueryable <int> QueryStatus(string specificationId, string publishStatus) { SqlQuerySpec sqlQuerySpec = new SqlQuerySpec { QueryText = @"SELECT VALUE COUNT(1) FROM c WHERE c.documentType = 'Calculation' AND c.content.current.publishStatus = @PublishStatus AND c.content.specificationId = @SpecificationId" }; SqlParameter[] sqlParameters = { new SqlParameter("@PublishStatus", publishStatus), new SqlParameter("@SpecificationId", specificationId) }; sqlQuerySpec.Parameters = new SqlParameterCollection(sqlParameters); IQueryable <int> result = _cosmosRepository.RawQuery <int>(sqlQuerySpec, 1, true); return(result); }