Пример #1
0
 public async Task <IActionResult> VerifyPartExists(string inputPartNumber)
 {
     // just in case the input gets sent without being set
     if (String.IsNullOrWhiteSpace(inputPartNumber))
     {
         return(Json($"The part number cannot be empty."));
     }
     else if (!await _partsService.PartExists(inputPartNumber))
     {
         return(Json($"The part {inputPartNumber} could not be found."));
     }
     return(Json(true));
 }