public BooksDisplayed UpdateBook(BooksDisplayed bookUpdate) { var book = _context.BooksInStore.Attach(bookUpdate); book.State = Microsoft.EntityFrameworkCore.EntityState.Modified; _context.SaveChanges(); return(bookUpdate); }
public BooksDisplayed DeleteBook(int?Id) { BooksDisplayed book = _context.BooksInStore.Find(Id); if (book != null) { _context.BooksInStore.Remove(book); _context.SaveChanges(); } return(book); }
public BooksDisplayed AddBook(BooksDisplayed books) { throw new NotImplementedException(); }
public BooksDisplayed UpdateBook(BooksDisplayed bookUpdate) { throw new NotImplementedException(); }
public BooksDisplayed AddBook(BooksDisplayed book) { _context.BooksInStore.Add(book); _context.SaveChanges(); return(book); }