public Renter GetById(int RenterId) { var Renter = RenterRepository.GetById(RenterId); if (Renter == null) { throw new BadRequestException(ErrorMessages.TrabajadorNoEncontrado); } return(Renter); }
public void DeleteRenter(int RenterId) { var Renter = RenterRepository.GetById(RenterId); RenterRepository.Delete(Renter); }
public void OnGet(int id) { Renter = RenterRepository.GetById(id); Rentals = RentalRepository.GetByRenterId(id); Renter.Rentals = Rentals; }