public Book AddBook(Book book) { book.Id = Environment.TickCount; Books.Add(book); return book; }
public Book UpdateBook(Book book) { var persistedBook = Books.Single(b => b.Id == book.Id); Books.Remove(persistedBook); Books.Add(book); return book; }
public void updateBook(Book book) { var newBook = _repository.UpdateBook(book); Clients.bookUpdated(newBook); }