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

            book.Add(new SingleRating(rating));

            dao.Save(book);
        }
Ejemplo 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));
        }