Пример #1
0
        public Worker GetById(int WorkerId)
        {
            var Worker = WorkerRepository.GetById(WorkerId);

            if (Worker == null)
            {
                throw new BadRequestException(ErrorMessages.TrabajadorNoEncontrado);
            }

            return(Worker);
        }
Пример #2
0
        public void DeleteWorker(int WorkerId)
        {
            var Worker = WorkerRepository.GetById(WorkerId);

            WorkerRepository.Delete(Worker);
        }
Пример #3
0
 public async Task <Worker> GetWorkerById(long id)
 {
     return(await _workerRepository.GetById(id));
 }