see on GitHub

Miscellaneous conventions


Disable all profiling support which has been enabled by the DocumentStore.InitializeProfiling() call.

Conventions.DisableProfiling = true;


It determines whether RavenDB client should automatically enlist in distributed transactions or not. Default: true.

Conventions.EnlistInDistributedTransactions = true;


The max number of requests per session. See the related article for details.

Conventions.MaxNumberOfRequestsPerSession = 30;


It determines if C# enum types should be saved as integers or strings and instruct the Linq provider to query enums as integer values. Default: false.

Conventions.SaveEnumsAsIntegers = false;


This convention allows to enable optimistic concurrency for all opened sessions. More about optimistic concurrency you will find here. By default concurrency checks are turned off:

Conventions.DefaultUseOptimisticConcurrency = false;


It determines if it should attempt to prettify the generated Linq expressions in definitions of indexes and transformers (used by the following classes: AbstractIndexCreationTask, AbstractMultiMapIndexCreationTask, AbstractTransformerCreationTask and IndexDefinitionBuilder).

Conventions.PrettifyGeneratedLinqExpressions = true;


This conventions determines if index and transformer definitions should be replicated to destination servers when indexes and transformers are deployed using the AbstractIndexCreationTask and AbstractTransformerCreationTask.

Possible values are:

  • None,
  • Indexes,
  • Transformers

with default set to Indexes | Transformers.

Conventions.IndexAndTransformerReplicationMode = IndexAndTransformerReplicationMode.Indexes
                                                 | IndexAndTransformerReplicationMode.Transformers;