Пример #1
0
        public void AddDvd(DVD dvd)
        {
            var url     = "http://www.imdb.com/find?ref_=nv_sr_fn&q=";
            var urlBack = "&s=all";

            try
            {
                var splitTitle = dvd.Title.Split(' ');
                foreach (var word in splitTitle)
                {
                    url += word + "+";
                }
                url = url.Substring(0, url.Length - 1) + urlBack;
            }
            catch
            {
                url = url + dvd.Title + urlBack;
            }
            finally
            {
                dvd.Website = url;
                _repo.AddDvd(dvd);
            }
        }