Click or drag to resize
SessionExtensionsGetTableTEntity Method

Extension method used for backward-compatibility, use TableTEntity(ISession) constructor instead.

Creates a new instance of the Linq IQueryProvider that represents a table in Cassandra using the mapping configuration provided.

Fluent configuration or attributes can be used to define mapping information.

Namespace: Cassandra.Data.Linq
Assembly: Cassandra (in Cassandra.dll) Version: 3.4.0
Syntax
C#
public static Table<TEntity> GetTable<TEntity>(
	this ISession session,
	string tableName = null,
	string keyspaceName = null
)

Parameters

session
Type: CassandraISession
The session to be used to execute the statements
tableName (Optional)
Type: SystemString
The table name in Cassandra. If null, it will be retrieved from the TEntity information.
keyspaceName (Optional)
Type: SystemString
The keyspace in which the table exists. If null, the current session keyspace will be used.

Type Parameters

TEntity
The object type

Return Value

Type: TableTEntity

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ISession. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
In case no mapping information is defined, case-sensitive class and method names will be used.
See Also