Class MappingConfiguration
Stores the mapping definitions to be used by the Mapper and Linq components.
Inheritance
System.Object
MappingConfiguration
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Dse.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
Type |
Description |
System.Int32 |
|
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(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(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(Int32)
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 |
System.Int32 |
value |
|
Returns