public void Update(Book book) { var bookToUpdate = GetById(book.Id); bookToUpdate.Author = book.Author; bookToUpdate.Title = book.Title; bookToUpdate.PublishedDate = book.PublishedDate; _context.Update(bookToUpdate); _context.SaveChanges(); }
public void Update(Book book) { var bookToUpdate = GetById(book.Id); bookToUpdate.Author = book.Author; bookToUpdate.Name = book.Name; bookToUpdate.PublisedDate = book.PublisedDate; _booksAPIContext.Update(bookToUpdate); SaveContextChanges(_booksAPIContext); }