Exemplo n.º 1
0
        public void EditBook(BookModel book)
        {
            BookAuthors.DeleteBookAuthors(book.BookId);
            book.Authors.ForEach(t =>
                                 BookAuthors.Add(new BookAuthors {
                BookId = book.BookId, AuthorId = t
            }));

            Books.Update(new Book
            {
                BookId      = book.BookId,
                PubHouseId  = book.PubHouseId,
                PublishYear = book.PublishYear,
                NumPages    = book.NumPages,
                ISBN        = book.ISBN,
                Title       = book.Title
            });
        }
Exemplo n.º 2
0
 public void DeleteBook(long id)
 {
     BookAuthors.DeleteBookAuthors(id);
     Books.Delete(id);
 }