Example #1
0
        public IActionResult Delete(Car car)
        {
            var result = _carServices.Delete(car);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #2
0
 public ActionResult <string> Delete(Guid key)
 {
     try
     {
         _logger.LogInformation("Received get request");
         _carServices.Delete(key);
         return(Ok("success"));
     }
     catch (Exception exception)
     {
         _logger.LogError(exception, exception.Message);
         return(new StatusCodeResult(500));
     }
 }