Esempio n. 1
0
        public static void Set(TableName table, TableEntity value)
        {
            TableStoreEntity container       = new TableStoreEntity(value);
            TableOperation   insertOperation = TableOperation.Insert(container);
            CloudTable       cloudTable      = tables.Value[table.ToString()];

            cloudTable.Execute(insertOperation);
        }
Esempio n. 2
0
        public static void Delete(TableName table, TableEntity value)
        {
            TableStoreEntity container = new TableStoreEntity(value);

            container.ETag = "*";
            TableOperation deleteOperation = TableOperation.Delete(container);
            CloudTable     cloudTable      = tables.Value[table.ToString()];

            cloudTable.Execute(deleteOperation);
        }
Esempio n. 3
0
        public static void Update(TableName table, TableEntity value)
        {
            TableStoreEntity container = new TableStoreEntity(value);

            container.ETag      = "*";
            container.Timestamp = DateTime.UtcNow;
            TableOperation updateOperation = TableOperation.InsertOrReplace(container);
            CloudTable     cloudTable      = tables.Value[table.ToString()];

            cloudTable.Execute(updateOperation);
        }