//Remove Bookmarks from Bookmarks Table public Task <Bookmarks> RemoveBookmarks(int userId, params int[] postIds) { FilterDefinition <Bookmarks> filter = GetUserIdFilter(userId); Task <Bookmarks> removeTask = MongoArrayUtils <Bookmarks> .RemoveFromArray <int>(db.Bookmarks, filter, POST_IDS, postIds); return(removeTask); }
//Remove a user's like from a post public Task <Likes> RemoveLike(int postId, params int[] userIds) { FilterDefinition <Likes> filter = GetPostIdFilter(postId); Task <Likes> task = MongoArrayUtils <Likes> .RemoveFromArray(db.Likes, filter, USER_IDS, userIds); return(task); }
//Removes tag from Tags table public Task <Tags> RemoveTag(string tagText, int postId) { FilterDefinition <Tags> filter = GetTagTextFilter(tagText); Task <Tags> task = MongoArrayUtils <Tags> .RemoveFromArray <int>(db.Tags, filter, POST_IDS, new int[] { postId }); return(task); }