Example #1
0
 public void AddAdult(Adult adult)
 {
     // int max = Adults.Max(adult => adult.Id);
     // adult.Id = (++max);
     // Adults.Add(adult);
     // string productsAsJson = JsonSerializer.Serialize(Adults);
     // File.WriteAllText(adultsFile, productsAsJson);
     Adults.Add(adult);
     SaveAdultsToFile();
 }
Example #2
0
 public void Update(Adult toUpdate)
 {
     JobTitle = toUpdate.JobTitle;
     base.Update(toUpdate);
 }