public void AddPodCast(PodCast podCast) { if (PodCasts == null) { PodCasts = new List <PodCast>(); } PodCasts.Add(podCast); }
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); }