public AppGroupDTO(Group group) { GroupId = group.GroupId; GroupName = group.GroupName; ProjectId = group.ProjectId; UniqueGroupCode = group.UniqueGroupCode; if (group.Order != null) { Order = new OrderDTO(group.Order); } if (group.Project != null) { Project = new AppProjectDTO(group.Project); } }
public AppGroupDTO(Group group) { GroupId = group.GroupId; GroupName = group.GroupName; ProjectId = group.ProjectId; UniqueGroupCode = group.UniqueGroupCode; if (group.Order != null) { Order = new OrderDTO(group.Order); } if (group.Project != null) { Project = new AppProjectDTO(group.Project); } Pupils = new List <PupilDTO>(); foreach (PupilGroup pupilGroup in group.PupilGroups) { Pupils.Add(new PupilDTO(pupilGroup.Pupil)); } }