public static BranchesStudents Convert(List <BranchStudentDto> studentBranchsDto) { if (studentBranchsDto != null) { BranchesStudents studentsBranchs = new BranchesStudents(); foreach (BranchStudentDto studentBranch in studentBranchsDto) { BranchStudent item = Convert(studentBranch); studentsBranchs.Add(item); } return(studentsBranchs); } return(null); }
public static BranchesStudents TableToBranchStudent(DataTable table, Student.Includes includes = Student.Includes.None) { if (table == null) { return(null); } BranchesStudents branchesStudents = new BranchesStudents(); foreach (DataRow row in table.Rows) { branchesStudents.Add(RowToBranchStudent(table.AsEnumerable(), includes)); } return(branchesStudents); }