public EthnicityDTO InsertEthnicity(EthnicityDTO data) { Ethnicity dataToInsert = new Ethnicity(); dataToInsert = EthnicityRequestFormatter.ConvertRespondentInfoFromDTO(data); return(EthnicityRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.EthnicityRepository.Create(dataToInsert))); }
public int UpdateEthnicity(EthnicityDTO data) { Ethnicity dataToUpdate = EthnicityRequestFormatter.ConvertRespondentInfoFromDTO(data); int res = _unitOfWork.EthnicityRepository.Update(dataToUpdate); _unitOfWork.Save(); return(res); }