예제 #1
0
        public EthnicityDTO InsertEthnicity(EthnicityDTO data)
        {
            Ethnicity dataToInsert = new Ethnicity();

            dataToInsert = EthnicityRequestFormatter.ConvertRespondentInfoFromDTO(data);
            return(EthnicityRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.EthnicityRepository.Create(dataToInsert)));
        }
예제 #2
0
        public int UpdateEthnicity(EthnicityDTO data)
        {
            Ethnicity dataToUpdate = EthnicityRequestFormatter.ConvertRespondentInfoFromDTO(data);
            int       res          = _unitOfWork.EthnicityRepository.Update(dataToUpdate);

            _unitOfWork.Save();
            return(res);
        }
예제 #3
0
 public EthnicityDTO GetEthnicityById(int id)
 {
     return(EthnicityRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.EthnicityRepository.GetById(id)));
 }