public BusinessGroupDTO GetBusinessGroupById(int bgID) { //BusinessGroupDTO modelDatas = BusinessGroupRequestFormatter.ConvertRespondentInfoToDTO( _unitOfWork.BusinessGroupRepository.All().Where(x => x.BgId == bgID).FirstOrDefault()); BusinessGroupDTO modelDatas = BusinessGroupRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.BusinessGroupRepository.GetById(bgID)); return(modelDatas); }
public int UpdateBusinessGroup(BusinessGroupDTO data) { BusinessGroup BusinessGroupEditData = BusinessGroupRequestFormatter.ConvertRespondentInfoFromDTO(data); var response = _unitOfWork.BusinessGroupRepository.Update(BusinessGroupEditData); _unitOfWork.Save(); return(response); }
public BusinessGroupDTO InsertDepartment(BusinessGroupDTO data) { BusinessGroup businessGroup = BusinessGroupRequestFormatter.ConvertRespondentInfoFromDTO(data); return(BusinessGroupRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.BusinessGroupRepository.Create(businessGroup))); }