Parameters
- name
- The name to use for the description object
Exception | Description |
---|---|
System.ArgumentException | name is invalid |
await QueuedTask.Run(() => { using (var kg = GetKnowledgeGraph()) { if (kg == null) return; var entity_name = "PhoneCall"; var relate_name = "WhoCalledWho"; var entityDesc = new KnowledgeGraphEntityTypeDescription(entity_name); var relateDesc = new KnowledgeGraphRelationshipTypeDescription(relate_name); //Run the schema builder try { SchemaBuilder sb = new(kg); sb.Delete(entityDesc); sb.Delete(relateDesc); //Use the KnowledgeGraph extension method 'ApplySchemaEdits(...)' //to refresh the Pro UI if (!kg.ApplySchemaEdits(sb)) { var err_msg = string.Join(",", sb.ErrorMessages.ToArray()); System.Diagnostics.Debug.WriteLine($"Entity/Relate Delete error: {err_msg}"); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } });
Target Platforms: Windows 11, Windows 10