public async Task <Response> Handle(RemoveParkingRequest request, CancellationToken cancellationToken) { var parking = await _parkingRepository.GetById(request.Id); if (parking == null) { return(new NotFoundResult($"Parking not found to Parking Id: {request.Id}")); } _parkingRepository.Delete(parking); await _unitOfWork.SaveChangesAsync(); return(new OkResult($"Parking {request.Id} remove sucessfully")); }
public bool Delete(int id) { return(parkingRepository.Delete(id)); }
public void Delete(string name) { ParkingRepository.Delete(name); }
public void Undo() { parkingRepository.Delete(createdParkingId); }