// TO DO: There is probably a better return value than bool here private bool CreateAlternateFuelForCustomer(Commands.V1.OperatingContext.Customer.AlternateFuel.CreateForCustomer cmd) { if (_repository.AlternateFuelExistsForCustomer(cmd.AlternateFuelId, cmd.CustomerId)) { throw new InvalidOperationException($"Alternate fuel already exists for Customer {cmd.CustomerId}"); } _repository.LinkAlternateFuelToCustomer(cmd.AlternateFuelId, cmd.CustomerId); return(true); }