Class SessionExtensions
Inheritance
object
SessionExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Cassandra.Data.Linq
Assembly: Cassandra.dll
Syntax
public static class SessionExtensions
Methods
CreateBatch(ISession, BatchType)
Declaration
public static Batch CreateBatch(this ISession session, BatchType batchType)
Parameters
Type | Name | Description |
---|---|---|
ISession | session | |
BatchType | batchType |
Returns
Type | Description |
---|---|
Batch |
CreateBatch(ISession)
Declaration
public static Batch CreateBatch(this ISession session)
Parameters
Type | Name | Description |
---|---|---|
ISession | session |
Returns
Type | Description |
---|---|
Batch |
GetTable<TEntity>(ISession, string, string)
Deprecated. Extension method used for backward-compatibility, use Table(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.
Declaration
public static Table<TEntity> GetTable<TEntity>(this ISession session, string tableName = null, string keyspaceName = null)
Parameters
Type | Name | Description |
---|---|---|
ISession | session | The session to be used to execute the statements |
string | tableName | The table name in Cassandra. If null, it will be retrieved from the TEntity information. |
string | keyspaceName | The keyspace in which the table exists. If null, the current session keyspace will be used. |
Returns
Type | Description |
---|---|
Table<TEntity> |
Type Parameters
Name | Description |
---|---|
TEntity | The object type |
Remarks
In case no mapping information is defined, case-sensitive class and method names will be used.