Example #1
0
        public PhoneBookOutDTO AddNumber(PhoneBookInDTO phoneBook)
        {
            var user = PhoneBookToUser(phoneBook);

            var createdUser = _phoneBookRepository.AddNumber(user);

            return(UserToPhoneBookConverter(createdUser));
        }
        public PhoneDTO Post(PhoneDTO phoneBook)
        {
            var phone = _mapper.Map <Phone>(phoneBook);

            _repository.AddNumber(phone);

            return(_mapper.Map <PhoneDTO>(phone));
        }