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 BusinessGroupDTO InsertDepartment(BusinessGroupDTO data) { BusinessGroup businessGroup = BusinessGroupRequestFormatter.ConvertRespondentInfoFromDTO(data); return(BusinessGroupRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.BusinessGroupRepository.Create(businessGroup))); }