public void RemoveCar(string regNumber) { try { Rentals.RemoveCar(regNumber); } catch { DoesNotExistFault fault = new DoesNotExistFault(); fault.Operation = "Remove car"; fault.Description = "Car does not exist"; throw new FaultException <DoesNotExistFault>(fault); } }
//BackOffice-metoder: public string DeleteCar(string id) { string message = r.RemoveCar(id); return(message); }