dj-nitehawk / MongoDB.Entities

A data access library for MongoDB with an elegant api, LINQ support and built-in entity relationship management
https://mongodb-entities.com
MIT License
543 stars 69 forks source link

CreateCollectionAsync() - small documentation changes #191

Closed paolobriones closed 1 year ago

paolobriones commented 1 year ago

In the "Entities" section called "Create a collection explicitly" showed how to create a Capped collection:

await DB.CreateCollectionAsync<Book>(o =>
{
    o.Collation = new Collation("es");
    o.Capped = true;
    o.MaxDocuments = 10000;
});

o.MaxSize MUST also be set to create capped collections properly