public Worker GetById(int WorkerId) { var Worker = WorkerRepository.GetById(WorkerId); if (Worker == null) { throw new BadRequestException(ErrorMessages.TrabajadorNoEncontrado); } return(Worker); }
public void DeleteWorker(int WorkerId) { var Worker = WorkerRepository.GetById(WorkerId); WorkerRepository.Delete(Worker); }
public async Task <Worker> GetWorkerById(long id) { return(await _workerRepository.GetById(id)); }