Inheritance: Microsoft.WindowsAzure.Storage.Table.TableEntity
Exemplo n.º 1
0
        public void Delete(Triple triple)
        {
            var actions = new Action[]
            {
                () =>
                {
                    var entity1 = new GraphEntity(triple)
                    {
                        PartitionKey = JoinKey(PROPERTY_SUBJECT, triple.Property, triple.Subject), RowKey = KeyEncoder(triple.Value), ETag = "*"
                    };
                    table.Execute(TableOperation.Delete(entity1));
                },
                () =>
                {
                    var entity2 = new GraphEntity(triple)
                    {
                        PartitionKey = JoinKey(SUBJECT_VALUE, triple.Subject, triple.Value), RowKey = KeyEncoder(triple.Property), ETag = "*"
                    };
                    table.Execute(TableOperation.Delete(entity2));
                },
                () =>
                {
                    var entity3 = new GraphEntity(triple)
                    {
                        PartitionKey = JoinKey(VALUE_PROPERTY, triple.Value, triple.Property), RowKey = KeyEncoder(triple.Subject), ETag = "*"
                    };
                    table.Execute(TableOperation.Delete(entity3));
                }
            };

            Parallel.Invoke(actions);
        }
Exemplo n.º 2
0
        public void Delete(Triple triple)
        {
            var actions = new Action[]
                {
                    () =>
                        {
                            var entity1 = new GraphEntity(triple) {PartitionKey = JoinKey(PROPERTY_SUBJECT, triple.Property, triple.Subject), RowKey = KeyEncoder(triple.Value), ETag = "*"};
                            table.Execute(TableOperation.Delete(entity1));
                        },
                    () =>
                        {
                            var entity2 = new GraphEntity(triple) {PartitionKey = JoinKey(SUBJECT_VALUE, triple.Subject, triple.Value), RowKey = KeyEncoder(triple.Property), ETag = "*"};
                            table.Execute(TableOperation.Delete(entity2));
                        },
                    () =>
                        {
                            var entity3 = new GraphEntity(triple) {PartitionKey = JoinKey(VALUE_PROPERTY, triple.Value, triple.Property), RowKey = KeyEncoder(triple.Subject), ETag = "*"};
                            table.Execute(TableOperation.Delete(entity3));
                        }
                };

            Parallel.Invoke(actions);
        }