---
title: 'ARC0005: Value produced by Provide is not consumed by Handle'
---

## Rule

When a command declares a `Provide()` method, every value it produces must be consumed by a parameter of the command's `Handle()` method. A produced value that no `Handle` parameter can receive is almost always a mistake.

Control values that short-circuit execution rather than feed `Handle` — `ValidationResult`, `AuthorizationResult`, and `CommandResult` — are exempt.

## Severity

Warning

## Example

### Violation

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

[Command]
public record ApproveLoan(ApplicantId Applicant)
{
    public CreditScore Provide(ICreditBureau bureau) => bureau.GetScore(Applicant);

    public void Handle()
    {
    }
}
```

`Provide` returns a `CreditScore`, but `Handle` has no parameter that can receive it.

### Fix

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

[Command]
public record ApproveLoan(ApplicantId Applicant)
{
    public CreditScore Provide(ICreditBureau bureau) => bureau.GetScore(Applicant);

    public LoanApproved Handle(CreditScore creditScore) => new(Applicant, creditScore);
}
```

See [Provide data to a command handler](/arc/scenarios/provide-data-to-a-command/) for the full pattern.
