public IDataResult <Worker> GetById(int workerId) { try { var worker = _workerDal.Get(w => w.WorkerId == workerId); return(new SuccessDataResult <Worker>(worker)); } catch (Exception) { return(new ErrorDataResult <Worker>(Messages.ErrorWhileGettingEntity)); } }
public IDataResult <Worker> GetByID(int workerID) { return(new SuccessDataResult <Worker>(_workerDal.Get(w => w.WorkerID == workerID))); }