---
title: 'ARC0004: [Command] type must have public Handle() method'
description: Declare a public instance Handle method on each model-bound command.
---


<a id="severity"></a>

## Rule

A `[Command]` type must declare a public instance `Handle()` method. Missing, non-public, and static handlers do not satisfy this check. **Default severity: Error.**

<a id="example"></a>
<a id="violation"></a>

## Diagnostic examples

Each block is a separate declaration example for a project referencing `Cratis.Arc.Core`, not a runnable host. The first two intentionally produce ARC0004.

Missing handler:

```csharp
using Cratis.Arc.Commands.ModelBound;

[Command]
public record NormalizeName(string Name);
```

Non-public handler:

```csharp
using Cratis.Arc.Commands.ModelBound;

[Command]
public record NormalizeName(string Name)
{
    internal string Handle() => Name.Trim();
}
```

<a id="fix"></a>

Corrected declaration:

```csharp
using Cratis.Arc.Commands.ModelBound;

[Command]
public record NormalizeName(string Name)
{
    public string Handle() => Name.Trim();
}
```

The synchronous string is an ordinary response; a handler need not return an event. See [model-bound commands](/arc/backend/csharp/commands/model-bound/) for supported behavior.
