Пример #1
0
 public void AddPodCast(PodCast podCast)
 {
     if (PodCasts == null)
     {
         PodCasts = new List <PodCast>();
     }
     PodCasts.Add(podCast);
 }
Пример #2
0
        public void Add(PodCast podCast)
        {
            if (Categories == null)
            {
                Categories = new List <PodCastCategory>();
            }

            var category = Categories.Where(x => x.Name == podCast.Category).FirstOrDefault();

            if (category == null)
            {
                category = new PodCastCategory(podCast.Category);
                Categories.Add(category);
            }

            category.AddPodCast(podCast);
        }