public Patient(string jmbg, string name, string surname) { Jmbg = new Jmbg(jmbg); Name = name; Surname = surname; UnavailableAppointments = new List <Appointment>(); Validate(); }
public Patient(string jmbg, string name, string surname, IEnumerable <DateTime> unavailableAppointments) { Jmbg = new Jmbg(jmbg); Name = name; Surname = surname; if (unavailableAppointments is null) { UnavailableAppointments = new List <Appointment>(); } else { UnavailableAppointments = unavailableAppointments.Select(a => new Appointment(a)); } Validate(); }