---
title: ARC0026 - Invalid explicit query declaration
editUrl: https://github.com/Cratis/Arc/edit/main/Documentation/backend/csharp/code-analysis/ARC0026.md
description: Correct an invalid Query marker or ambiguous explicit query name.
---


<!-- Copyright (c) Cratis. All rights reserved. -->
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->

## Correct the marked declaration

`[Query]` expresses endpoint intent on a `[ReadModel]`. It does not make an invalid method eligible. A marked method must be ordinary, public or internal, static, and nongeneric, with value parameters and a supported read-model return shape. Plain `Task`, unsupported return types, by-reference arguments or results, and a missing read-model owner are errors. Correct the declaration or remove the marker.

A parameter of the exact declaring read-model type (`T` or nullable `T?`) makes a method ineligible, regardless of its name or parameter position. `[Query]` cannot override that exclusion. Remove `[Query]` from a self-reduction/helper method; leave its current-state parameter intact.

Validation applies even when `RequireQueryAttribute` is false. That default retains conventional discovery: marking one method does not hide siblings or widen return eligibility.

## Resolve a duplicate name

In `RequireQueryAttribute = true` mode, two selected overloads with the same name cannot have distinct query identities. Rename one endpoint or remove its marker. An unmarked overload can remain as a helper.

See [explicit endpoint selection and migration preview](/arc/backend/csharp/queries/model-bound/static-methods/#choose-endpoints-explicitly-when-a-model-has-helpers).
