Class Map<TPoco>
A class for defining how to map a POCO via a fluent-style interface. The mapping for Type T should be defined in the
constructor of the sub class.
Inheritance
System.Object
Map<TPoco>
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 class Map<TPoco> : ITypeDefinition
Type Parameters
Constructors
Map()
Creates a new fluent mapping definition for POCOs of Type TPoco.
Declaration
Methods
CaseSensitive()
Specifies that when generating queries, the table and column names identifiers must be quoted. Defaults to false.
Declaration
public Map<TPoco> CaseSensitive()
Returns
Type |
Description |
Map<TPoco> |
|
ClusteringKey(Expression<Func<TPoco, Object>>)
Specifies a Clustering key with unspecified order
Declaration
public Map<TPoco> ClusteringKey(Expression<Func<TPoco, object>> column)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression<System.Func<TPoco, System.Object>> |
column |
Expression to select the property or the field
|
Returns
Type |
Description |
Map<TPoco> |
|
ClusteringKey(Expression<Func<TPoco, Object>>, SortOrder)
Specifies a Clustering key with its clustering order
Declaration
public Map<TPoco> ClusteringKey(Expression<Func<TPoco, object>> column, SortOrder order)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression<System.Func<TPoco, System.Object>> |
column |
Expression to select the property or the field
|
SortOrder |
order |
Clustering order
|
Returns
Type |
Description |
Map<TPoco> |
|
ClusteringKey(String[])
Specifies the clustering key column names for the table using the order provided.
Declaration
public Map<TPoco> ClusteringKey(params string[] columnNames)
Parameters
Type |
Name |
Description |
System.String[] |
columnNames |
|
Returns
Type |
Description |
Map<TPoco> |
|
ClusteringKey(Tuple<String, SortOrder>[])
Specifies the Clustering keys with the corresponding clustering order
Declaration
public Map<TPoco> ClusteringKey(params Tuple<string, SortOrder>[] columnNames)
Parameters
Type |
Name |
Description |
System.Tuple<System.String, SortOrder>[] |
columnNames |
|
Returns
Type |
Description |
Map<TPoco> |
|
Column<TProp>(Expression<Func<TPoco, TProp>>)
Sets the mapping for the expression using the default options.
Declaration
public Map<TPoco> Column<TProp>(Expression<Func<TPoco, TProp>> column)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression<System.Func<TPoco, TProp>> |
column |
|
Returns
Type |
Description |
Map<TPoco> |
|
Type Parameters
Column<TProp>(Expression<Func<TPoco, TProp>>, Action<ColumnMap>)
Defines options for mapping the column specified.
Declaration
public Map<TPoco> Column<TProp>(Expression<Func<TPoco, TProp>> column, Action<ColumnMap> columnConfig)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression<System.Func<TPoco, TProp>> |
column |
|
System.Action<ColumnMap> |
columnConfig |
|
Returns
Type |
Description |
Map<TPoco> |
|
Type Parameters
CompactStorage()
Specifies that the table is defined as COMPACT STORAGE
Declaration
public Map<TPoco> CompactStorage()
Returns
Type |
Description |
Map<TPoco> |
|
ExplicitColumns()
Specifies that when mapping, we should only map columns that are explicitly defined here. Use the Column method
to define columns.
Declaration
public Map<TPoco> ExplicitColumns()
Returns
Type |
Description |
Map<TPoco> |
|
KeyspaceName(String)
Specifies that when mapping, the table name should include the keyspace.
Use only if the table you are mapping is in a different keyspace than the current ISession.
Declaration
public Map<TPoco> KeyspaceName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
Type |
Description |
Map<TPoco> |
|
PartitionKey(Expression<Func<TPoco, Object>>[])
Specifies the properties/fields on the POCO whose column names are the partition key for the table.
Declaration
public Map<TPoco> PartitionKey(params Expression<Func<TPoco, object>>[] columns)
Parameters
Type |
Name |
Description |
System.Linq.Expressions.Expression<System.Func<TPoco, System.Object>>[] |
columns |
|
Returns
Type |
Description |
Map<TPoco> |
|
PartitionKey(String[])
Specifies the partition key column names for the table using the order provided.
Declaration
public Map<TPoco> PartitionKey(params string[] columnNames)
Parameters
Type |
Name |
Description |
System.String[] |
columnNames |
|
Returns
Type |
Description |
Map<TPoco> |
|
TableName(String)
Specifies what table to map the POCO to.
Declaration
public Map<TPoco> TableName(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
Returns
Type |
Description |
Map<TPoco> |
|
Explicit Interface Implementations
ITypeDefinition.AllowFiltering
Declaration
bool ITypeDefinition.AllowFiltering { get; }
Returns
Type |
Description |
System.Boolean |
|
ITypeDefinition.CaseSensitive
Declaration
bool ITypeDefinition.CaseSensitive { get; }
Returns
Type |
Description |
System.Boolean |
|
ITypeDefinition.ClusteringKeys
Declaration
Tuple<string, SortOrder>[] ITypeDefinition.ClusteringKeys { get; }
Returns
Type |
Description |
System.Tuple<System.String, SortOrder>[] |
|
ITypeDefinition.CompactStorage
Declaration
bool ITypeDefinition.CompactStorage { get; }
Returns
Type |
Description |
System.Boolean |
|
ITypeDefinition.ExplicitColumns
Declaration
bool ITypeDefinition.ExplicitColumns { get; }
Returns
Type |
Description |
System.Boolean |
|
ITypeDefinition.GetColumnDefinition(FieldInfo)
Declaration
IColumnDefinition ITypeDefinition.GetColumnDefinition(FieldInfo field)
Parameters
Type |
Name |
Description |
System.Reflection.FieldInfo |
field |
|
Returns
ITypeDefinition.GetColumnDefinition(PropertyInfo)
Declaration
IColumnDefinition ITypeDefinition.GetColumnDefinition(PropertyInfo property)
Parameters
Type |
Name |
Description |
System.Reflection.PropertyInfo |
property |
|
Returns
ITypeDefinition.KeyspaceName
Declaration
string ITypeDefinition.KeyspaceName { get; }
Returns
Type |
Description |
System.String |
|
ITypeDefinition.PartitionKeys
Declaration
string[] ITypeDefinition.PartitionKeys { get; }
Returns
Type |
Description |
System.String[] |
|
ITypeDefinition.PocoType
Declaration
Type ITypeDefinition.PocoType { get; }
Returns
Type |
Description |
System.Type |
|
ITypeDefinition.TableName
Declaration
string ITypeDefinition.TableName { get; }
Returns
Type |
Description |
System.String |
|
Implements