In my project, I want to create a class that handles all the dirty Azure work and provide a clean interface where I simply provide entities to store.
I tried creating the table in my constructor but it does not allow it. And I cannot figure what is wrong with this construction.
Any idea or alternative way of doing things ?
Cheers, Alex
using System;
using System.Threading.Tasks;
using Microsoft.Azure;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Table;
namespace MyProject
{
public class AzureStorage
{
public async Task<AzureStorage> AzureStorage()
{
table = await CreateTableAsync("mytable");
}
CloudTable table { get; set; }
}
}