Beispiel #1
0
        public async Task <IActionResult> GetByVin(string vin)
        {
            if (vin == null)
            {
                return(BadRequest());
            }

            var decodedVin = await _vinService.GetDecodedVin(vin);

            if (decodedVin == null)
            {
                return(BadRequest("Request was invalid"));
            }

            return(Ok(decodedVin));
        }
        public async Task <IViewComponentResult> InvokeAsync(string vin)
        {
            var vinResult = await _vinDecoderService.GetDecodedVin(vin);

            return(View(vinResult));
        }