Example #1
0
        public string Create(Address address)
        {
            IEnumerable <string> request =
                from add in _repository.GetAddresses()
                select add.ShortUrl;

            var urlsCollection = new List <string>(request);

            var result = AddressCreator.Create(address, urlsCollection);

            if (result)
            {
                _repository.AddAddress(address);
                return("Запись создана");
            }

            return("Введеный Url не валиден.");
        }