Esempio n. 1
0
        public OfficeTypeDTO InsertOfficeType(OfficeTypeDTO data)
        {
            OfficeType dataToInsert = new OfficeType();

            dataToInsert = OfficeTypeRequestFormatter.ConvertRespondentInfoFromDTO(data);
            return(OfficeTypeRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.OfficeTypeRepository.Create(dataToInsert)));
        }
Esempio n. 2
0
        public int UpdateOfficeType(OfficeTypeDTO data)
        {
            OfficeType dataToUpdate = new OfficeType();

            dataToUpdate = OfficeTypeRequestFormatter.ConvertRespondentInfoFromDTO(data);
            var response = _unitOfWork.OfficeTypeRepository.Update(dataToUpdate);

            return(response);
        }
Esempio n. 3
0
 public OfficeTypeDTO GetOfficeTypeById(int id)
 {
     return(OfficeTypeRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.OfficeTypeRepository.GetById(id)));
 }