public static IList <StudentContactViewData> Create(IList <StudentContactDetails> studentContacts) { return(studentContacts.Select(x => new StudentContactViewData { PersonInfo = PersonInfoViewData.Create(x.Person), RelationshipName = x.ContactRelationship.Name, IsFamilyMember = x.IsFamilyMember, IsAllowedToPickup = x.CanPickUp, IsEmergencyContact = x.IsEmergencyContact, IsResponsibleForBill = x.IsResponsibleForBill, IsCustodian = x.IsCustodian, ReceivesBill = x.ReceivesBill, ReceivesMailings = x.ReceivesMailings }).ToList()); }
protected StudentParentViewData(StudentParentDetails studentParent) { Id = studentParent.Id; Parent = PersonInfoViewData.Create(studentParent.Parent); }