SDK
SDK C# v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

ExistsAsync #

Checks if a collection exists in Kuzzle.

Arguments #

public async Task<bool> ExistsAsync(
    string index,
    string collection);
ArgumentTypeDescription
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);
}