This is the documentation for the DataStax Enterprise C# Driver for DSE. This driver is built on top of the DataStax C# driver for Apache Cassandra and enhanced for the adaptive data management and mixed workload capabilities provided by DataStax Enterprise. Therefore a lot of the underlying concepts are the same and to keep this documentation focused we will be linking to the relevant sections of the DataStax C# driver for Apache Cassandra documentation where necessary.
Getting started
Getting started with the DataStax Enterprise C# Driver.
Installation
PM> Install-Package Dse
Upgrading from the core driver
To Upgrade from CassandraCSharpDriver
to Dse
, add the namespace with the using
directive.
using Dse;
And create IDseCluster
and IDseSession
instances.
IDseCluster cluster = DseCluster.Builder()
.AddContactPoint("127.0.0.1")
.Build();
IDseSession session = cluster.Connect();
Execute CQL queries
IDseSession
extends the core driver counterpart ISession
, so you can use IDseSession
instances to execute CQL
queries.
RowSet rs = session.Execute("select * from system.local");
Execute Graph queries
Additionally, IDseSession
exposes graph-specific methods.
GraphResultSet rs = session.ExecuteGraph(new SimpleGraphStatement("g.V()"));