DataAccessLayer.Models.PersonInfo LoadPerson(DataAccessLayer.Models.Person person) { int id = person.BusinessEntityID; DataAccessLayer.Models.Password password = DAL.GetPassword(id); DataAccessLayer.Models.Email email = DAL.GetEmail(id); DataAccessLayer.Models.PersonPhone personPhone = DAL.GetPhone(id); DataAccessLayer.Models.Address address = DAL.GetAddress(id); DataAccessLayer.Models.PersonInfo personInfo = new DataAccessLayer.Models.PersonInfo(person, password, email, personPhone, address); return(personInfo); }
public List <Person> GetListOfPeople() { List <Person> list = new List <Person>(); for (int i = 0; i < 100; i++) { dal.GetPerson(list, i); dal.GetPassword(list, i); dal.GetAddress(list, i); dal.GetEmailAddress(list, i); dal.GetPhoneNumber(list, i); } return(list); }