示例#1
0
        public void UpdateDefect(DefectDTO defectDTO)
        {
            DefectDAL defectDAL = _mapper.Map <DefectDAL>(defectDTO);

            _unitOfWork.Defects.Update(defectDAL);
            _unitOfWork.Save();
        }
示例#2
0
        public DefectDTO GetDefect(int?id)
        {
            DefectDAL defectDAL = _unitOfWork.Defects.GetByID(id.Value);

            if (defectDAL == null)
            {
                return(null);
            }
            DefectDTO defectDTO = _mapper.Map <DefectDTO>(defectDAL);

            return(defectDTO);
        }
示例#3
0
        public void UpdateDefect(DefectDTO defectDTO)
        {
            if (defectDTO == null)
            {
            }
            DefectDAL defect = new DefectDAL
            {
                DefectId    = defectDTO.DefectId,
                Name        = defectDTO.Name,
                Description = defectDTO.Description,
                State       = defectDTO.State,
                Severity    = defectDTO.Severity,
                Priority    = defectDTO.Priority,
                Status      = defectDTO.Status
            };

            _unitOfWork.Defects.Update(defect);
            _unitOfWork.Save();
        }