Exemplo n.º 1
0
        private BookLoanModel ConvertEntityToModel(BookLoanEntity bookLoanEntity)
        {
            BookLoanModel bookLoanModel = _mapper.Map <BookLoanModel>(bookLoanEntity);

            bookLoanModel.BookKeyId   = _bookBusiness.GetBookById(bookLoanEntity.BookId).KeyId;
            bookLoanModel.ReaderKeyId = _readerBusiness.GetReaderById(bookLoanEntity.ReaderId).KeyId;

            return(bookLoanModel);
        }