//public void DeleteTrainingById(int id)
        //{
        //    _unitOfWork.EmployeeTrainingRepository.Delete(id);
        //    _unitOfWork.Save();
        //}

        //public IEnumerable<EmployeeTrainingDTO> GetAllTrainingOfEmployee(int id)
        //{
        //    var res = _unitOfWork.EmployeeTrainingRepository.All().Where(x => x.EmpCode == id);
        //    return EmployeeTrainingResponseFormatter.ModelData(res);
        //}

        //public EmployeeTrainingDTO GetTrainingById(int trainingId)
        //{
        //    EmployeeTraining data = _unitOfWork.EmployeeTrainingRepository.GetById(trainingId);
        //    return EmployeeTrainingRequestFormatter.ConvertRespondentInfoToDTO(data);
        //}

        //public void InsertEmployeeTraining(EmployeeTrainingDTO data)
        //{
        //    data.TrainingDays = (data.TrainingEndDate - data.TrainingStartDate).Value.Days;
        //    data.TrainingYear = data.TrainingStartDate.Value.Year;
        //    EmployeeTraining dataToInsert = EmployeeTrainingRequestFormatter.ConvertRespondentInfoFromDTO(data);
        //    _unitOfWork.EmployeeTrainingRepository.Create(dataToInsert);
        //}

        //public int UpdateTraining(EmployeeTrainingDTO data)
        //{
        //    EmployeeTraining dataToUpdate = EmployeeTrainingRequestFormatter.ConvertRespondentInfoFromDTO(data);
        //    return _unitOfWork.EmployeeTrainingRepository.Update(dataToUpdate);
        //}
        public List <EmpTrainingDTO> GetAllTrainingOfEmployeeWithId(int id)
        {
            List <EmpTraining>           Domain = _unitOfWork.EmpTrainingRepository.Get(x => x.EmpCode == id).ToList();
            IEnumerable <EmpTrainingDTO> Record = EmpTrainingResponseFormatter.ModelListData(Domain);

            return(Record.ToList());
        }
        public EmpTrainingDTO GetEmployeeTrainingById(int id)
        {
            EmpTraining    Record       = _unitOfWork.EmpTrainingRepository.GetById(id);
            EmpTrainingDTO ReturnRecord = EmpTrainingResponseFormatter.ModelData(Record);

            return(ReturnRecord);
        }