Skip to content

Instantly share code, notes, and snippets.

View LukeTillman's full-sized avatar

Luke Tillman LukeTillman

View GitHub Profile
@LukeTillman
LukeTillman / RequestsInParallel.cs
Created June 2, 2015 21:09
Async Requests in Parallel
// Use a prepared statement for all the INSERTs
PreparedStatement prepared = session.Prepare("INSERT INTO sometable (column1, column2) VALUES (?, ?)");
// Create a list to hold in flight requests
var requestList = new List<Task>();
// Assume you have some collection of data that needs to be inserted
foreach(var data in dataToInsert)
{
// Provide data values to be inserted with our prepared statement for this piece of data
@LukeTillman
LukeTillman / Program.cs
Last active August 29, 2015 14:02
Getting Started with Apache Cassandra and C#
using System;
using System.Linq;
using Cassandra;
namespace GettingStarted
{
class Program
{
static void Main(string[] args)
{