예제 #1
0
        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);
        }
예제 #2
0
        public int UpdateBusinessGroup(BusinessGroupDTO data)
        {
            BusinessGroup BusinessGroupEditData = BusinessGroupRequestFormatter.ConvertRespondentInfoFromDTO(data);
            var           response = _unitOfWork.BusinessGroupRepository.Update(BusinessGroupEditData);

            _unitOfWork.Save();
            return(response);
        }
예제 #3
0
        public BusinessGroupDTO InsertDepartment(BusinessGroupDTO data)
        {
            BusinessGroup businessGroup = BusinessGroupRequestFormatter.ConvertRespondentInfoFromDTO(data);

            return(BusinessGroupRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.BusinessGroupRepository.Create(businessGroup)));
        }