public IActionResult Update(string id, BookShelfm bshelfIn) { var bshelf = _bshelf.Get(id); if (bshelf == null) { return(NotFound()); } _bshelf.Update(id, bshelfIn); return(NoContent()); }
public ActionResult <BookShelfm> Create(BookShelfm bshelf) { _bshelf.Create(bshelf); return(CreatedAtRoute(nameof(GetBookShelf), new { ID = bshelf.ID.ToString() }, bshelf)); }
public void Update(string id, BookShelfm bookShlfIn) => _bookShelf.ReplaceOne(bookShlf => bookShlf.ID == id, bookShlfIn);
public void Remove(BookShelfm bookShlfIn) => _bookShelf.DeleteOne(bookShlf => bookShlf.ID == bookShlfIn.ID);
public BookShelfm Create(BookShelfm bookShlf) { _bookShelf.InsertOne(bookShlf); return(bookShlf); }