How to create collection with TTL?

I create a collection of objects

public class User
public User(string fullname, string email)
Fullname = fullname;
Email = email;

    public string Fullname { get; }
    public string Email { get; }

And create the index and some docs

var collection = _database.GetCollection(“bar”);
collection.Indexes.CreateOne(new CreateIndexModel
(new BsonDocument(“lastModifiedDate”, 1), new CreateIndexOptions { ExpireAfter = new TimeSpan(0, 0, 30) }));

            var user = new User("Vasya", "");
            var user1 = new User("Petya", "");
            var user2 = new User("Kolya", "");
            count = collection.CountDocuments(new BsonDocument());

But when I see http://localhost:8081/db/dbtest/ then I do not see any TTL and documents do not expire after 30 secs.

What I do wrong? How to create collection or documents in it with TTL?

Thanks to all. Solved.