private Either <string, int> Validate(UpdateIngredient command) => GreatThanZero(command.Id) .ToEither("O id para deletar tem que ser maior que 0");
public Task <Either <string, Unit> > Handle(UpdateIngredient command) => Validate(command) .Match <Task <Either <string, Unit> > >( async id => await _ingredientRepository.Update(new Ingredient(id, command.Name, command.Value)), (v) => Task.FromResult(new Either <string, Unit>(v)) );