public override TeachingCost TranslateToModel(TEACHING_COST entity) { try { TeachingCost model = null; if (entity != null) { model = new TeachingCost(); model.Id = entity.Teaching_Cost_Id; model.StudentCategory = _studentCategoryTranslator.Translate(entity.STUDENT_CATEGORY); model.QualificationCategory = _qualificationCategoryTranslator.Translate(entity.QUALIFICATION_CATEGORY); model.NoOfPeriod = entity.No_Of_Period; model.Amount = entity.Amount; model.DateEntered = entity.Date_Entered; //if (entity.QUALIFICATION_CATEGORY != null && entity.QUALIFICATION_CATEGORY.QUALIFICATION != null && entity.QUALIFICATION_CATEGORY.QUALIFICATION.Count > 0) //{ // model.Qualifications = _qualificationTranslator.Translate(entity.QUALIFICATION_CATEGORY.QUALIFICATION.ToList()); //} } return(model); } catch (Exception) { throw; } }
public override Qualification TranslateToModel(QUALIFICATION entity) { try { Qualification model = null; if (entity != null) { model = new Qualification(); model.Id = entity.Qualification_Id; model.Name = entity.Qualification_Name; model.Description = entity.Qualification_Description; model.SchoolType = _schoolTypeTranslator.Translate(entity.SCHOOL_TYPE); model.Category = _qualificationCategoryTranslator.Translate(entity.QUALIFICATION_CATEGORY); } return(model); } catch (Exception) { throw; } }