appwrite/docs/examples/1.8.x/server-dotnet/examples/tables/create-index.md

600 B

using Appwrite; using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services;

Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("<YOUR_PROJECT_ID>") // Your project ID .SetKey("<YOUR_API_KEY>"); // Your secret API key

Tables tables = new Tables(client);

ColumnIndex result = await tables.CreateIndex( databaseId: "<DATABASE_ID>", tableId: "<TABLE_ID>", key: "", type: .Key, columns: new List(), orders: new List(), // optional lengths: new List() // optional );