public async Task <ActionResult <Book> > PostBook([FromBody] Book book) { _context.Book.Add(book); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBook", new { id = book.Id }, book)); }
public virtual Task <int> SaveChangesAsync() { return(_db.SaveChangesAsync()); }