public void UpdateDefect(DefectDTO defectDTO) { DefectDAL defectDAL = _mapper.Map <DefectDAL>(defectDTO); _unitOfWork.Defects.Update(defectDAL); _unitOfWork.Save(); }
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); }
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(); }