►
Description
So you've grabbed the latest 2.0 beta of DataStax C# driver from NuGet. Now what? In this talk, Luke will walk you through some of the basics of the C# driver--how to bootstrap the driver and connect to a cluster, execute statements, and retrieve result sets. Wondering what the difference between a PreparedStatement and a SimpleStatement is? Not sure what the appropriate lifetime for a Cluster or a Session object is and whether you should reuse one (from multiple threads)? What about ADO.NET and LINQ support? We'll cover this and more, so that you can get on with building applications on top of Cassandra and .NET.
A
Always
be
found
that
web
stack
with
Microsoft
the
official
website,
it's
under
an
Apache
2
license
that
blows
my
mind.
Basically,
you
know
like
it's.
It's
really
about
that
kind
of
gossip.
So
just
real
quickly
about
me,
my
back
and
I'm,
like
I,
am
I've
been
an
application
developer.
Everything
about
this
after
Patrick
and
I
worked
together
a
grievance.
A
Based
we
had
a
really
big
CRM,
but
they
distributed
systems
by
hundreds
of
colleges
and
universities
across
the
country.
So
my
job
as
the
language
Mantle's,
my
sort
of
my
interest,
I
guess
at
the
hybrid
Vangelis-
is
really
having
build
stuff
on
top
of
a
sander
right.
So
again
you
guys
have
probably
heard
some
stuff
about
internals.
Maybe.
B
A
Going
to
talk
to
you
about
the
c-sharp
driver,
if
anybody
here
is
an
odyssey
show
person,
that's
totally
cool
a
lot
of
what
I'm
gonna
say
actually
applies
to
the
other
drivers
as
well.
So
one
of
the
cool
things
about
the
date
stacks
drivers
is
a
lot
of
the
concepts
are
very,
very
similar.
So
if
you're,
a
Python
person
or
if
you're,
a
Java
person
or
a
C++
I,
think
it's
our
latest
driver
that
might
be
Manor.
But
now
a
lot
of
the
concepts
are
the
same.
B
A
Thing
to
know
where
did
the
drivers
so
like
most
projects
these
days
most
I
know
projects.
We've
got
a
new
package,
so
use
a
package
manager
to
install
it.
You
cannot
spare
github
with
you
much
I
got
sources,
get
up,
comma
slash.
Data
stack
school
comes
to
show
the
driver.
We
just
came
out
of
200,
so
200
beta,
so
it's
just
the
kPa.
So
there's
a
lot
of
cool
new
features
and
stuff
they
can
con
take
advantage
if
you're,
using
this
a
chef
driver
that
could
before
some
of
the
problem
with
some
of
the.
A
Alright,
so,
let's
start
from
the
beginning,
we'll
talk
about
bootstrapping
driver,
so
the
first
panel
was
top-level
object
that
you
need
to
know
about
when
you're
writing
code
is
the
cluster
object
and
it's
a
symptom,
so
you're
going
to
create
one
for
application
unless,
for
some
reason,
you're
in
a
scenario
where
you're
talking
to
multiple
Cassandra
clusters
tenses
are
most
of
the
time
you're
going
to
be
in
a
single
application
or
inside
the
surface
boundary,
maybe
Anna.
So
what
kind
of
thing
you're.
A
A
A
A
A
B
A
B
A
A
A
B
A
B
B
A
A
A
A
A
A
Seven
statements
they're
good
core,
one-off
statements
or
dynamics
eql,
where
you're
going
to
be
running
like
a
slightly
different
statement
every
time
they
do
look
dynamically
building
a
rare
clause
or
you're
dynamically
building
a
select
statement
or
something
where
the
cql
is
going
to
be
just
a
little
bit
different.
Every
time
you
run
it,
that's
kind
of
you
stays
or
with
simple
statements
we
coming
in
or
they're
good.
If
you're
just
prototyping,
you
just
want
to
kind
of
write
something
really.
A
B
A
A
This
an
actually
gave
a
server
round-trip.
Can
you
solve
prepare,
and
this
is
sort
of
an
optimization
step.
So
the
idea
is
that
I
prepare
once
and
then
I
reuse,
that
prepared
statement
over
and
over
and
over
and
over
and
over
again
for
queries
that
I'm
going
to
run
over
another.
Why
do
we
do
that?
I
can
pass
it
off
to
the
server.
A
Is
they
can
go
ahead
and
learn
three
parts
that
seems
well
statement,
figure
out
that
execution
plan
ahead
of
time
and
all
that
kind
of
good
stuff,
and
then
we
see
essentially
how
to
do
that.
Every
time
we
run
four
statements
never
run
a
lot.
We
don't
have
to
have
Sam
go
do
that
for
every
time
we
want
to
run
that
statement.
A
So
the
other
thing
to
know
is
that
once
you
create
once
you
prepare
a
statement,
you
should
actually
save
this
prepared
statement.
Instance,
probably
something
like
maybe
a
class.
B
A
A
Do
that
once
save
it
off
somewhere
and
then
actually
want
to
execute
it?
And
that's
where
the
other
half
of
this
amount
statement
comes
in
line,
so
here
I'm
showing
you
how
we
actually
then
provide
about.
So
if
you
saw
it
and
we're
emailing
wolves
question
mark
so
here
I'm,
actually
providing
the
cumulative
value
prepared.
The
prepared
statement
that
I
saved
also
clarifying
and
then
I
did
a
bounce
statement
back
and
that's
one
that
I
can
actually
execute.
That's
one
that
can
actually
be
executed
against
Monsanto
and
the.
A
That
this
can
do
is
that
when
it
actually
goes
to
execute
against
Cassandra
behind
the
scenes,
it
only
has
to
send
your
by
variable
thousand
seven,
the
cql
string
every
time,
and
so
that's
another
thing
that
you
kind
of
save
us
long
latency.
We
don't
have
that
you
send
in
the
same
string
and
if
you
think
about
it,
like
most
a
lot
of
applications,
they've
bill
even
on
relational
databases,
SQL
right,
we're
running
the.
A
Over
and
over
and
over
and
over
and
over
again,
probably
just
with
different
parameters
right,
so
we
go
from
amortized
queries
or
sometimes
just
the
values,
essentially
no
clogging
interchanging,
and
so
you
will
probably
use
these
in
your
most
common
use.
Cases
you'll
uses
all
the
time.
This
is
like
yeah,
like
I,
said,
simple
thing
that
kind
of
scenario,
but
this
this
one
they
use
a
lot.
A
A
B
A
We
would
want
to
do
when
they
sign
the
application,
isn't
want
a
normalized
rating,
so
we
want
to
write
to
both
of
those
stables
at
the
same
time
with
you
to
insert
statements
and
to
do
that.
What
we're
going
to
do
is
we're
going
to
actually
put
in
a
match,
and
so
you
can
see
to
create
one
of
these
pretty
dead,
simple
rents
and
we
just
knew
off
Ashley
and
then
we
add.
This
is
just
to
show
that
you
can
mix
simple
statements
and
balance
statements,
and
not
just
so
you
could.
A
It
can
mix
and
match
like
math
except
you
wanna
keep
your
batch
size
small.
So
if
there
isn't
there's
a
overhead
associated
with
matches
like
you
mentioned
right
work,
they
have
a
hit.
Stock.
Batches
are
log,
so
their
atomic
ID
Paul.
That's
the
people
kind
of
batch
button
and
that's
the
primary
use
case
really
that
you
should
be
using
them
for,
if
you
ever
start
thinking
in
and
you
want
to
actually
do
one
of
the
other
mention
there
are
other
batch
types
available
to
you
and
canvas
up
a
batch
type
on
the
statement.
A
A
And
then
counters-
and
you
probably
already
heard
many
times-
counters-
are
kinda
like
their
own
little
thing
or
there's
a
lots
of
funky
rules
and
things
about
counters
batches
are
another
case
where
counters
can
have
special
rules.
They
have
their
own
batch
that
you
can
mix
and
match
encountered
mutations
with
other
statements.
A
So
the
other
thing
to
know
about
statements
is
that
you've
got
all
hands
options.
So
there's
a
bunch
of
stuff
that
could
be
sent
essentially
on
a
query
by
query
basis
or
on
a
statement
by
saying
on
faces.
So
we
set
the
consistency
level.
You
can
set
the
be
try
policy,
you
can
set
paging
size
that
can
use
automatic
page
in
which
we'll
talk
about
automatic
paging.
A
A
They
take
away
from
for
five,
then
you'll
probably
want
to
use
facing
and
that
won't
actually
walk
in
thread.
That
will
let
something
else
go
and
do
work
potentially,
then
potentially
field
controller,
something
else
and
let
it
let
that
thread
go,
do
something
else.
Lots
waiting
on
a
response,
for
example,
you'll
see
that
in
both
cases
we
get
back
a
row
set.
So
what
is
a
rosette,
so
row.
A
A
A
Should
also
mention
the
tea
you
get
value
T,
that's
just
without
that
type
of
whatever
whatever
call
value
it
is
that
you're
getting
and
I'll
show
you
some
of
the
mappings
from
CTL
datatype
static
data
types
of
can
have
a
transition
back
so
because
Rose
says
implements
my
new
role
row.
Obviously
the
first
thing
you
can
do
should
hear
it
before
each.
So
you
can
see
here
we're
doing
session
that
excuse
rose.
A
A
A
The
same
for
getting
on
UT
here,
but
the
big
difference
being
that
here
we're
getting
my
ordinal
or
by
composition,
so
that
I
called
me.
So
that
is
available
to
you
and
then
the
last
thing
you
maybe
that's
kind
of
interesting
that
you'll
end
up
using
a
lot
is
that
you
can
also
use
linked
optics,
the
single
or
single
or
people
method,
which
is
kind
of
nice.
A
B
A
A
A
A
A
Use
them
what
you
don't
want
rights
to
step
on
each
other,
so
this
is
sometimes
called
linearizable
consistency,
error
or
in
the
relational
world,
and
you've
done
a
lot
of
relational
stuff.
I
mean
a
serial
isolation
level
where
we
have
one
writer
essentially
at
a
time.
We
want
make
sure
that
doesn't
kind
of
step
on
don't
step
on
each
other.
I'm
sure
Patrick
mentioned
that's
that
if,
when.
A
A
A
The
processed
thing
is:
that's
all
there
has
to
be
one
more
round
trips
or
something
and
there's
a
latest
gossips
actually
involved
involved
in
using
them.
So
usually
when
you
need
them,
but
don't
don't
go
in
thinking.
I
need
to
use
this
everywhere
really
would
be
interesting
to
see
a
scenario
where
you
really
needed
to
use
a
monopolist.
A
A
Username,
but
we
don't
have
two
people
sign
up
with
the
same
thing:
that'll
get
us
or
something
like
that.
So
that's
that's
kind
of
what
the
example
that
we
always
use
and
what
does
that
actually
look
like,
so
this
is
kind
of
showing
that
that
scenario
right
so
here
we're
just
using
a
simple
statement
and
you'll
see.
Ql
strength
looks
pretty
much
like
what
you
see
before
and
then.
A
That's
the
cql
syntax
for
lightweight
transactions.
What
one
of
them
I
think
there's
there's
another
way
to
do
it
as
well,
but
it's
not
saying
we're
going
to
use
language
transactions
that
part
of
the
CTL
statement
and
you'll
see
that
when
I
actually
execute
that
statement,
what
comes
back
is
I
hit
a
row
set
but
I'm
going
to
get
a
single
row
back.
So
that's
why
gurus
that
single
here
and
you
can
actually
get
a
special
column
back?
That's
called
apply.
B
A
Just
tried
to
do
the
new
user,
who
does
try
to
create,
was
successful
or
not,
and
this
might
be
different
than
what
you
would
expect
if
you've
done
a
lot
of
stuff
with
relational
databases
before
you
might
expect
like
some
sort
of
primary
key
violation
or
a
constraint
violation
or
some
sort
of
exception,
basically
to
be
thrown,
not
the
case
with
you
saying.
Oh
you'll
get
this
callback
that
says
false,
basically,
whether
it's
to
see
our
automatic
page.
A
A
A
A
A
The
same
thing
over
in
July,
so
I'm
done.
This
was
like
a
really
big
button
with
the
standard
prior
to
a
prior
on
that
pager.
So
you
have
to
do
like
a
go
to
write
a
lot
extra
code
where
you
kept
stayed
and
the
seatbelt
statement
like
haven't
changed
every
time
so
that
you
could
do
like
a
where
to
get
the
next
page.
A
B
A
A
A
Basically,
until
it
runs
out
of
pages
of
records
again
now,
one
thing
to
keep
in
mind
is
that,
because
your
for
each
year
is
actually
is
actually
making
a
call
to
the
server
behind
the
scenes
that
you
can
actually
get
an
exception
right
like
so.
For
some
reason,
like
that
query,
to
get
the
second
page
of
the
third
page
times
out.
For
some
reason,
your
narrator
here
for
each
week
could
actually
throw
throw
in
some
time
and
like.
A
B
B
A
Were
really
long
time,
but
not
on
top
and
Cassandra
posted
on
top
evolution,
stuff
I
didn't
want
to
mention
this
sort
of
typical
aging
scenario,
because
when
I
heard
automatic
aging
like
I
was
like
okay
I've
been
paging.
Like
that's,
you
know,
I'm
thinking
of
paging
scenarios
that
I
deal
with
all
the
time,
my
god.
A
B
A
A
A
Alright,
so
just
a
few
other
things
to
mention
about
the
driver,
just
kind
of
to
wrap
up
a
little
bit
so
diamond
developers,
we
are
all
very
comfortable
or
familiar
with
link
at
this
point.
It's
been
around
for
a
while,
so
as
part
of
the
Union
package
that
comes
with
the
C
sharp
driver,
you're
actually
going
to
get
a
link
to
see
as
well
driver.
So
if
you
are
familiar
with
rank
and
you
like
wearying
the
blank
versus
you
know,
learning
learning,
CTL.