public ParentCourseGrade Build(ParentCourseGradesModel parentCourseGradesModel, int studentUsi) { var session = _sesssionRepository.GetById((int)parentCourseGradesModel.FindParentCourseModel.SessionId); var parentCourseGrade = new ParentCourseGrade { ParentCourseId = (Guid)parentCourseGradesModel.FindParentCourseModel.ParentCourseId, SchoolYear = session.SchoolYear, TermTypeId = session.TermTypeId, SchoolId = session.SchoolId }; Map(parentCourseGradesModel, studentUsi, parentCourseGrade); return parentCourseGrade; }
public void Map(ParentCourseGradesModel source, int studentUsi, ParentCourseGrade target) { target.GradeEarned = FindGradeOfStudentInParentGradesModelList(source.ParentGradesModelList, studentUsi); }