ExistsAsync #
Checks if a collection exists in Kuzzle.
Arguments #
public async Task<bool> ExistsAsync(
string index,
string collection);
Argument | Type | Description |
---|---|---|
index | string | Index name |
collection | string | Collection name |
Return #
A boolean indicating if the collection exists or not.
Exceptions #
Throws a KuzzleException
if there is an error. See how to handle error.
Usage #
try {
bool exists = await kuzzle.Collection.ExistsAsync("nyc-open-data", "green-taxi");
if (exists) {
Console.WriteLine("Collection green-taxi exists");
}
} catch (Exception e) {
Console.WriteLine(e);
}
Edit this page on Github(opens new window)