Table of Contents

Method HaveBsonRepresentation

Namespace
Microsoft.EntityFrameworkCore
Assembly
MongoDB.EntityFrameworkCore.dll

HaveBsonRepresentation(PropertiesConfigurationBuilder, BsonType, bool?, bool?)

Configures the BSON representation that the properties are stored as when targeting MongoDB.

public static PropertiesConfigurationBuilder HaveBsonRepresentation(this PropertiesConfigurationBuilder propertiesConfigurationBuilder, BsonType bsonType, bool? allowOverflow = null, bool? allowTruncation = null)

Parameters

propertiesConfigurationBuilder PropertiesConfigurationBuilder

The builder for the properties being configured.

bsonType BsonType

The MongoDB.Bson.BsonType to store these properties as.

allowOverflow bool?

Whether to allow overflow or not.

allowTruncation bool?

Whether to allow truncation or not.

Returns

PropertiesConfigurationBuilder

The same builder instance so that multiple calls can be chained.

HaveBsonRepresentation<TProperty>(PropertiesConfigurationBuilder<TProperty>, BsonType, bool?, bool?)

Configures the BSON representation that the properties are stored as when targeting MongoDB.

public static PropertiesConfigurationBuilder<TProperty> HaveBsonRepresentation<TProperty>(this PropertiesConfigurationBuilder<TProperty> propertiesConfigurationBuilder, BsonType bsonType, bool? allowOverflow = null, bool? allowTruncation = null)

Parameters

propertiesConfigurationBuilder PropertiesConfigurationBuilder<TProperty>

The builder for the properties being configured.

bsonType BsonType

The MongoDB.Bson.BsonType to store these properties as.

allowOverflow bool?

Whether to allow overflow or not.

allowTruncation bool?

Whether to allow truncation or not.

Returns

PropertiesConfigurationBuilder<TProperty>

The same builder instance so that multiple calls can be chained.

Type Parameters

TProperty

The type of the properties being configured.