public void createInvite(int teamID, invitee invite) { var filter = Builders <Team> .Filter.Eq(c => c.teamID, teamID); var update = Builders <Team> .Update.Push(c => c.teamInvites, invite); context.Teams.FindOneAndUpdate(filter, update); }
public void createInvite(int boardId, invitee invite) { var filter = Builders <Board> .Filter.Eq(c => c.BId, boardId); var update = Builders <Board> .Update.Push(c => c.BoardInvites, invite); context.Boards.FindOneAndUpdate(filter, update); }
public void createInvite(int cardID, invitee invite) { var filter = Builders <Card> .Filter.Eq(c => c.CId, cardID); var update = Builders <Card> .Update.Push(c => c.cardInvites, invite); context.Cards.FindOneAndUpdate(filter, update); }
public void RemoveInvite(int teamId, int inviteID) { Team GetTeam = context.Teams.Find(n => n.teamID == teamId).First(); invitee _invite = GetTeam.teamInvites.Find(n => n.inviteID == inviteID); var filter = Builders <Team> .Filter.Eq(n => n.teamID, teamId); var delete = Builders <Team> .Update.Pull(n => n.teamInvites, _invite); context.Teams.FindOneAndUpdate(filter, delete); }
public void UpdateInvite(int teamId, int inviteID, invitee invite) { Team GetTeam = context.Teams.Find(n => n.teamID == teamId).First(); invitee _invite = GetTeam.teamInvites.Find(n => n.inviteID == inviteID); var filter = Builders <Team> .Filter.Eq(n => n.teamID, teamId); var update = Builders <Team> .Update.Set(n => n.teamInvites.Find(b => b.inviteID == inviteID), _invite); context.Teams.FindOneAndUpdate(filter, update); }
public bool UpdateInvite(int cardId, int inviteID, invitee invite) { var filter = Builders <Card> .Filter.Eq(n => n.CId, cardId); var update = Builders <Card> .Update.Set(e => e.cardInvites.Find(n => n.inviteID == inviteID), invite); var updatedResult = context.Cards.UpdateOneAsync(filter, update).Result; return(updatedResult.IsAcknowledged && updatedResult.ModifiedCount > 0); }
public bool RemoveInvite(int teamId, int inviteID) { Team GetTeam = context.Teams.Find(n => n.teamID == teamId).First(); invitee _invite = GetTeam.teamInvites.Find(n => n.inviteID == inviteID); var filter = Builders <Team> .Filter.Eq(n => n.teamID, teamId); var delete = Builders <Team> .Update.Pull(n => n.teamInvites, _invite); var updatedResult = context.Teams.UpdateOneAsync(filter, delete).Result; return(updatedResult.IsAcknowledged && updatedResult.ModifiedCount > 0); }
public bool RemoveInvite(int cardId, int inviteID) { Card card = context.Cards.Find(n => n.CId == cardId).First(); invitee invitee = card.cardInvites.Find(n => n.inviteID == inviteID); var filter = Builders <Card> .Filter.Eq(n => n.CId, cardId); var update = Builders <Card> .Update.Pull(e => e.cardInvites, invitee); var updatedResult = context.Cards.UpdateOneAsync(filter, update).Result; return(updatedResult.IsAcknowledged && updatedResult.ModifiedCount > 0); }
public bool RemoveInvite(int boardId, int inviteID) { Board GetBoard = context.Boards.Find(n => n.BId == boardId).First(); invitee _invite = GetBoard.BoardInvites.Find(n => n.inviteID == inviteID); var filter = Builders <Board> .Filter.Eq(n => n.BId, boardId); var delete = Builders <Board> .Update.Pull(n => n.BoardInvites, _invite); var updatedResult = context.Boards.UpdateOneAsync(filter, delete).Result; return(updatedResult.IsAcknowledged && updatedResult.ModifiedCount > 0); }
public bool UpdateInvite(int teamId, int inviteID, invitee invite) { throw new NotImplementedException(); }
public void createInvite(int teamID, invitee invite) { throw new NotImplementedException(); }