When your resource is a Doctrine entity, there's a default provider Sylius\Component\Resource\Symfony\Request\State\Provider which is already configured to your operations.
As it uses the Doctrine repository configured on your resource, some default repository methods are used.
namespaceApp\BoardGameBlog\Infrastructure\Sylius\State\Processor;useApp\BoardGameBlog\Application\Command\DeleteBoardGameCommand;useApp\BoardGameBlog\Domain\ValueObject\BoardGameId;useApp\BoardGameBlog\Infrastructure\Sylius\Resource\BoardGameResource;useApp\Shared\Application\Command\CommandBusInterface;useSylius\Resource\Context\Context;useSylius\Resource\Context\Option\RequestOption;useSylius\Resource\Metadata\Operation;useSylius\Resource\State\ProcessorInterface;useWebmozart\Assert\Assert;finalclassDeleteBoardGameProcessorimplementsProcessorInterface{publicfunction__construct(privateCommandBusInterface $commandBus, ) { }publicfunctionprocess(mixed $data,Operation $operation,Context $context):mixed {Assert::isInstanceOf($data,BoardGameResource::class);// Data is not provided in this case, so you will need to get it from the HTTP request $id = $context->get(RequestOption::class)?->attributes->get('id')?? null;Assert::notNull($id);$this->commandBus->dispatch(newDeleteBoardGameCommand(newBoardGameId($id)));return null; }}