/// <summary> /// 查询借用详情 /// </summary> /// <param name="borrowId"></param> /// <returns></returns> public BorrowDto QueryBorrow(int borrowId) { var result = new BorrowDto(); result.BorrowInfo = _borrowRep.Find(borrowId); if (null != result.BorrowInfo) { result.Details = _borrowDetailRep.QueryDto(borrowId); } return(result); }
public void Delete(int bookID, int studentID) { if (bookID == 0) { throw new ArgumentException("bookID"); } if (studentID == 0) { throw new ArgumentException("studentID"); } Borrow Borrow = _borrowRepository.Find(bookID, studentID); _borrowRepository.Delete(Borrow); }