Example #1
0
        public async Task <VehicleDataTableItem> LoadAsync(string vin)
        {
            var operationConfig = new DynamoDBOperationConfig
            {
                OverrideTableName = TableName
            };

            // ensure case consistency on key property
            vin = vin.ToUpper();

            VehicleDataTableItem item = await _db.LoadAsync <VehicleDataTableItem>(vin, operationConfig);

            return(item);
        }
Example #2
0
        public async Task <VehicleData> GetVehicleDataAsync(string vin)
        {
            VehicleDataTableItem item = await _table.LoadAsync(vin);

            if (item == null)
            {
                return(null);
            }

            var data = new VehicleData
            {
                VIN          = item.VIN,
                CustomerId   = item.CustomerId,
                Make         = item.Make,
                Model        = item.Model,
                ModelYear    = item.ModelYear,
                ImportedDate = item.ImportedDate
            };

            return(data);
        }