Example #1
0
 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));
     }
 }
Example #2
0
 public IDataResult <Worker> GetByID(int workerID)
 {
     return(new SuccessDataResult <Worker>(_workerDal.Get(w => w.WorkerID == workerID)));
 }