Esempio n. 1
0
        public void Rate(long id, int rating)
        {
            Book book = dao.FindById(id);

            book.Add(new SingleRating(rating));

            dao.Save(book);
        }
Esempio n. 2
0
        public void Borrow(long userId, long bookId)
        {
            var user = userDao.FindById(userId);
            var book = bookDao.FindById(bookId);

            borrowingDao.Insert(new Borrowing(user, book));
        }