public void Rate(long id, int rating) { Book book = dao.FindById(id); book.Add(new SingleRating(rating)); dao.Save(book); }
public void Borrow(long userId, long bookId) { var user = userDao.FindById(userId); var book = bookDao.FindById(bookId); borrowingDao.Insert(new Borrowing(user, book)); }