Class MappingConfiguration
Stores the mapping definitions to be used by the Mapper and Linq components.
Inheritance
MappingConfiguration
Assembly: Cassandra.dll
Syntax
public sealed class MappingConfiguration
Constructors
MappingConfiguration()
Creates a new instance of MappingConfiguration to store the mapping definitions to be used by the Mapper or Linq components.
Declaration
public MappingConfiguration()
Properties
Global
Global mapping definitions to be reused across all the Application Domain.
Declaration
public static MappingConfiguration Global { get; }
Property Value
MaxPreparedStatementsThreshold
Gets or sets the maximum amount of prepared statements before issuing a logger warning. Defaults to 500.
Declaration
public int MaxPreparedStatementsThreshold { get; set; }
Property Value
Methods
ConvertTypesUsing(TypeConverter)
Configures CqlPoco to use the specified type conversion factory when getting type conversion functions for converting
between data types in the database and your POCO objects.
Declaration
public MappingConfiguration ConvertTypesUsing(TypeConverter typeConverter)
Parameters
Returns
Define(params ITypeDefinition[])
Specifies an individual mapping definition. Usually used along with the Map<TPoco> class which
allows you to define mappings with a fluent interface. Will throw if a mapping has already been defined for a
given POCO Type.
Declaration
public MappingConfiguration Define(params ITypeDefinition[] maps)
Parameters
Returns
Define(params Mappings[])
Specifies collections of Mappings specified. Users should sub-class the Mappings
class and use the fluent interface there to define mappings for POCOs.
Declaration
public MappingConfiguration Define(params Mappings[] mappings)
Parameters
Type |
Name |
Description |
Mappings[] |
mappings |
|
Returns
Define<T>()
Specifies a collection of mappings defined in Type T. Type T should be a sub-class of Mappings and
must have a parameter-less constructor.
Declaration
public MappingConfiguration Define<T>() where T : Mappings, new()
Returns
Type Parameters
Get<T>()
If defined, returns the mapping for POCO type T, otherwise returns null.
Declaration
public ITypeDefinition Get<T>()
Returns
Type Parameters
SetMaxPreparedStatementsThreshold(int)
Sets the maximum amount of prepared statements before issuing a logger warning. Defaults to 500.
Declaration
public MappingConfiguration SetMaxPreparedStatementsThreshold(int value)
Parameters
Type |
Name |
Description |
int |
value |
|
Returns