public IEnumerable <PhoneDTO> GetAllOrdered(bool orderByName, bool asc)
        {
            //get phones and users
            var phones = _repository.GetAllPhoneNumbers();

            IEnumerable <Phone> result = null;

            if (!asc)
            {
                if (!orderByName)
                {
                    result = phones.OrderByDescending(x => x.Surname);
                }
                else
                {
                    result = phones.OrderByDescending(x => x.Name);
                }
            }
            else
            {
                if (!orderByName)
                {
                    result = phones.OrderBy(x => x.Surname);
                }
                else
                {
                    result = phones.OrderBy(x => x.Name);
                }
            }

            // convert it into dto
            var phonesDto = _mapper.Map <IEnumerable <PhoneDTO> >(result);

            return(phonesDto);
        }