Exemplo n.º 1
0
        public Phone GetPhoneByPhoneId(string phoneId)
        {
            Guid phoneIdGuid = Guid.Empty;

            if (!Guid.TryParse(phoneId, out phoneIdGuid))
            {
                throw new Exception("Invalid Guid Format");
            }

            var phone = _PhoneRepository.GetPhoneByPhoneId(phoneIdGuid);

            if (phone == null)
            {
                throw new EntityNotFoundException(phoneIdGuid);
            }

            return(phone);
        }