Beispiel #1
0
        public void UpdateMagazine(Magazine magazine)
        {
            var mag = _magazines.Where(x => x.ID == magazine.ID).FirstOrDefault();

            if (mag != null)
            {
                mag.Author         = magazine.Author;
                mag.Name           = magazine.Name;
                mag.Publisher      = magazine.Publisher;
                mag.DatePublishing = magazine.DatePublishing;
                mag.Periodicity    = magazine.Periodicity;
                WriteToXml();
                ReadFromXml();
            }
        }
Beispiel #2
0
 public void AddMagazine(Magazine magazine)
 {
     _magazine = magazine;
     _magazines.Add(magazine);
     WriteToXml();
 }