Пример #1
0
        public bool AddUniqueTitle(string title)
        {
            bool toAdd = !Titles.Select(x => x.Title).Any(x => string.Equals(title, x, StringComparison.OrdinalIgnoreCase));

            if (toAdd)
            {
                Titles.Add(new ShowTitle {
                    ShowId = Id, Title = title, IsPrimary = !Titles.Any()
                });
            }

            return(toAdd);
        }