//get dal and convert it ti dto public MosdotToCandidateDto(MosdotToCandidate m) { codeMC = m.codeMC; codeMosad = m.codeMosad; codeCandidate = m.codeCandidate; yearOfFinish = m.yearOfFinish; }
//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); }