Ejemplo n.º 1
0
        private void SaveToStorage(string email)
        {
            string tableName = "signups";
            CloudStorageAccount account = CloudStorageAccount.Parse(tableConnectionString);

            //Client for Table storage
            CloudTableClient tableStorage = account.CreateCloudTableClient();
            var cloudTable = tableStorage.GetTableReference(tableName);
            cloudTable.CreateIfNotExists();

            //Create person entity and set email
            PersonEntity person = new PersonEntity();
            person.Email = email;
            person.PartitionKey = "signups";
            person.RowKey = email;

            //Save new person to the table
            cloudTable.Execute(TableOperation.Insert(person));
        }