public static AddressBusiness GetInstance() { if (instance == null) { lock (padlock) { instance = new AddressBusiness(); } } return(instance); }
public StudentBusiness() { addressBusiness = AddressBusiness.GetInstance(); xmlSerializer = new XmlSerializer(typeof(List <Student>)); if (studentInfos == null || studentInfos.Count == 0) { studentInfos = GetAllStudentInfos(); } //students = new List<NewStudent>(); //students.Add(new NewStudent { Id = 1, Name = "Nguyen Van A", Birthday = DateTime.Now, Gender = 1, AddressId = 78 }); //SaveStudents(); }