Skip to content

ARC0003: Handle() must be on [Command] type

Public Handle() methods that operate on a [Command] type must be declared on the command type itself.

Error

using Cratis.Arc.Commands.ModelBound;
[Command]
public record CreateOrder(string OrderId);
public class CreateOrderHandler
{
// ARC0003: Handle() for CreateOrder is not on the command type itself
public void Handle(CreateOrder command)
{
}
}
using Cratis.Arc.Commands.ModelBound;
[Command]
public record CreateOrder(string OrderId)
{
public void Handle()
{
}
}