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
propertiesConfigurationBuilderPropertiesConfigurationBuilderThe builder for the properties being configured.
bsonTypeBsonTypeThe MongoDB.Bson.BsonType to store these properties as.
allowOverflowbool?Whether to allow overflow or not.
allowTruncationbool?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
propertiesConfigurationBuilderPropertiesConfigurationBuilder<TProperty>The builder for the properties being configured.
bsonTypeBsonTypeThe MongoDB.Bson.BsonType to store these properties as.
allowOverflowbool?Whether to allow overflow or not.
allowTruncationbool?Whether to allow truncation or not.
Returns
- PropertiesConfigurationBuilder<TProperty>
The same builder instance so that multiple calls can be chained.
Type Parameters
TPropertyThe type of the properties being configured.