//convert dto object to dal public static MosdotToCandidate Todal(MosdotToCandidateDto m) { return(new MosdotToCandidate() { codeCandidate = m.codeCandidate, codeMC = m.codeMC, codeMosad = m.codeMosad, yearOfFinish = m.yearOfFinish }); }
//convert list of dal to dto public static List <MosdotToCandidateDto> ToDtoList(List <MosdotToCandidate> listm) { List <MosdotToCandidateDto> newList = new List <MosdotToCandidateDto>(); foreach (MosdotToCandidate m in listm) { MosdotToCandidateDto mdto = new MosdotToCandidateDto(m); newList.Add(mdto); } return(newList); }
//convert list of dto to dal public static List <MosdotToCandidate> TodalList(List <MosdotToCandidateDto> listm) { List <MosdotToCandidate> newList = new List <MosdotToCandidate>(); foreach (MosdotToCandidateDto m in listm) { MosdotToCandidate mdal = MosdotToCandidateDto.Todal(m); newList.Add(mdal); } return(newList); }