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);
        }
 public GraphEntity(Triple triple)
 {
     this.Subject = triple.Subject;
     this.Property = triple.Property;
     this.Value = triple.Value;
 }
Example #3
0
 public GraphEntity(Triple triple)
 {
     this.Subject  = triple.Subject;
     this.Property = triple.Property;
     this.Value    = triple.Value;
 }