1
votes

At the moment I'm struggling to connect and do operation in f# against the local azure table storage (developmentstorage).

The only method I could find to connect with the storage Auth.StorageCredentials(accountName, accountKey) doesn't seem to accept the developmentstorage=true string I'm using in the C# parse method.

I tried to use the corresponding account name and key (devstoreaccount1, Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==) but didn't worked.

Any idea on how to solve the issue?

2
I have open sourced an azure table storage client, written in F#, with some additional features over the Microsoft client. You may want to check it out. lucifurestash.codeplex.comhocho

2 Answers

1
votes

You can use CloudStorageAccount.DevelopmentStorageAccount to get a reference to a CloudStorageAccount object which points to development storage account.

open Microsoft.WindowsAzure.Storage
open Microsoft.WindowsAzure.Storage.Auth

[<EntryPoint>]
let main argv = 
    let cloudStorageAccount = CloudStorageAccount.DevelopmentStorageAccount;
    let cloudTableClient = cloudStorageAccount.CreateCloudTableClient();
    let tableName = "dummy";
    let table = cloudTableClient.GetTableReference(tableName);
    let tableCreated = table.CreateIfNotExists();
0
votes

This library may handle your requirements: http://dmohl.github.io/Fog/