private bool CheckIfVinAlreadyExists()

in Amazon.QLDB.DMVSample.Api/Functions/AddSecondaryOwnerFunction.cs [121:127]


        private bool CheckIfVinAlreadyExists(TransactionExecutor transactionExecutor, string vin)
        {
            IIonValue ionVin = this.valueFactory.NewString(vin);
            IResult selectResult = transactionExecutor.Execute("SELECT VIN FROM VehicleRegistration AS v WHERE v.VIN = ?", ionVin);

            return selectResult.Any(x => x.GetField("VIN").StringValue == vin);
        }