Table of Contents

Class MongoDbConfiguration

Namespace
Tharga.MongoDB.Configuration
Assembly
Tharga.MongoDB.dll
public record MongoDbConfiguration : IEquatable<MongoDbConfiguration>
Inheritance
MongoDbConfiguration
Implements
Derived
Inherited Members

Properties

AccessInfo

If provided the Atlas MongoDB firewall will be opened for the machine that makes the call. Default value is null.

public MongoDbApiAccess AccessInfo { get; init; }

Property Value

MongoDbApiAccess

AutoClean

Automatically clean database records and store back to the database when they are accessed. This feature is triggered by Values in the entity´s 'CatchAll', that can be cleaned in the 'EndInit' method. Default value is true.

public bool? AutoClean { get; init; }

Property Value

bool?

CleanOnStartup

Finds all items that needs cleaning when the first record is accessed. This method is only executed once in the lifetime of the application. Default value is false.

public bool? CleanOnStartup { get; init; }

Property Value

bool?

CreateCollectionStrategy

Default value is DropEmpty, meaning collections are created when the first entity is added and removed when the last entity is deleted. Change this behaviour with this configuration.

public CreateStrategy CreateCollectionStrategy { get; init; }

Property Value

CreateStrategy

FetchSize

The number of documents fetched from the database per call when streaming with GetAsync. When Options.Limit is not set, this acts as the batch size for paging through all results. Default value is null (falls back to 1000).

public int? FetchSize { get; init; }

Property Value

int?