Devi chiamare e await CreateOneAsync con una IndexKeysDefinition ottieni usando Builders.IndexKeys :
static async Task CreateIndex()
{
var client = new MongoClient();
var database = client.GetDatabase("db");
var collection = database.GetCollection<Hamster>("collection");
await collection.Indexes.CreateOneAsync(Builders<Hamster>.IndexKeys.Ascending(_ => _.Name));
}
Se non hai un Hamster puoi anche creare l'indice in un modo non fortemente tipizzato specificando la rappresentazione json dell'indice:
await collection.Indexes.CreateOneAsync("{ Name: 1 }");