private static async Task <List <T> > GetDocumentsAsync <T>(DocumentClient client, Expression <Func <T, bool> > expression) { return(await DocumentClientManager.FilterDocumentClient( client, Constants.DatabaseName, Constants.MatchLobbyTableName, expression)); }
public static async Task <List <MatchLobby> > GetMatchLobbyInfoAsync(DocumentClient client, Expression <Func <MatchLobby, bool> > expression) { return(await DocumentClientManager.FilterDocumentClient( client, Constants.DATABASE_NAME, Constants.MATCH_LOBBY_TABLE_NAME, expression )); }
public static async Task DeleteMatchLobbyFromDDBBAsync(DocumentClient client, string matchLobbyPartitionId, string matchLobbyId) { var docsToDelete = await DocumentClientManager.FilterDocumentClient( client, Constants.DatabaseName, Constants.MatchLobbyTableName, ExpressionUtils.GetDocumentByIdExpression(matchLobbyPartitionId)); if (docsToDelete == null || docsToDelete.Count == 0) { return; } foreach (var doc in docsToDelete) { await DocumentClientManager.DeleteDocumentFromClientAsync(client, doc, matchLobbyId); } }