public Managers Find(int id)
 {
     try
     {
         ManagerRepository repo = new ManagerRepository();
         return(repo.Find(id));
     }
     catch (Exception ex)
     {
         LogHelper.Log(LogTarget.File, ExceptionHelper.ExceptionToString(ex), true);
         throw new Exception("BusinessLogic::ManagerBusiness::Find::Error occured.", ex);
     }
 }
Пример #2
0
        public IEnumerable <ManagerDTO> Find(Func <Manager, bool> predicate)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap <Manager, ManagerDTO>()).CreateMapper();

            return(mapper.Map <IEnumerable <Manager>, List <ManagerDTO> >(_managerRepository.Find(predicate)));
        }