Skip to content

Instantly share code, notes, and snippets.

View KrzysFR's full-sized avatar

Christophe Chevalier KrzysFR

  • SnowBank SAS
  • Lille, France
View GitHub Profile
@KrzysFR
KrzysFR / FoundationDbDemo1.cs
Last active August 29, 2015 14:02 — forked from alexwirz/FoundationDbDemo1.cs
Updated to use directories, encoders, retry loops, ...
private static async Task Demo()
{
var cancellationTokenSource = new CancellationTokenSource();
using (var db = await Fdb.OpenAsync())
{
// open the "my_app/my_data" folder (created if missing)
var folder = await db.Directory.CreateOrOpenAsync(new [] { "my_app", "my_data" }, cancellationTokenSource.Token);
var firstId = Guid.NewGuid();
var firstSequence = new[] { "foo", "bar", "baz" };