Exemplo n.º 1
0
        public PersonsEntity SelectPersonById(int personId)
        {
            try
            {
                PersonsEntity returnedEntity;
                using (var repository = new PersonsRepository())
                {
                    returnedEntity = repository.SelectById(personId);
                }

                return(returnedEntity);
            }
            catch (Exception ex)
            {
                //Log exception error
                _loggingHandler.LogEntry(ExceptionHandler.GetExceptionMessageFormatted(ex), true);

                throw new Exception("BusinessLogic:PersonsBusiness::SelectPersonById::Error occured.", ex);
            }
        }