public ActionResult <bool> Create(VehicleModel input) { try { return(Ok(_repository.Create(input))); } catch (Exception ex) { _logger.LogError($"Error: Controller exception on Create(T input)"); return(StatusCode((int)HttpStatusCode.InternalServerError, new { Error = ex.Message })); } }
public Vehicle Create(Vehicle vehicle) { return(vehiclesRepository.Create(vehicle)); }