public bool AddNewBookmark(BOOKMARK newBookmarkModel) { bool _retVal = false; _context.BOOKMARKs.Add(newBookmarkModel); _context.SaveChanges(); _retVal = true; return _retVal; }
public bool UpdateBookmark(BOOKMARK updatedBookmarkModel) { bool _retVal = false; BOOKMARK _modelToBeUpdated = _context.BOOKMARKs.Find(updatedBookmarkModel.BOOKMARK_ID); if (_modelToBeUpdated != null) { _context.Entry(_modelToBeUpdated).CurrentValues.SetValues(updatedBookmarkModel); _context.SaveChanges(); _retVal = true; } return _retVal; }