public static async Task UndoLesson(DataServiceRestClient client) { //Delete attributes await client.DeleteAttributeDefinitions(Entity.Part, new[] { AttributeDefinition.Key }); await client.DeleteAttributeDefinitions(Entity.Characteristic, new[] { CatalogAttributeDefinition.Key }); await client.DeleteAttributeDefinitions(Entity.Catalog, new[] { CatalogColumnAttributeDefinition.Key }); //Delete catalogs await client.DeleteCatalogs(new[] { Catalog.Uuid }); }
public static async Task UndoLesson(DataServiceRestClient client) { await client.DeleteMeasurementsByUuid(new[] { Measurement.Uuid }); //The server can be configured to allow or disallow deleting of parts with measurements await client.DeleteCharacteristics(new[] { Characteristic.Uuid }); await client.DeleteParts(new[] { Part.Uuid }); await client.DeleteAttributeDefinitions(EntityDto.Measurement, new[] { MeasurementAttributeDefinition.Key }); await client.DeleteAttributeDefinitions(EntityDto.Value, new[] { ValueAttributeDefinition.Key }); }
public static async Task UndoLesson(DataServiceRestClient client) { //Delete the catalogs first, since deleting attributes which are used by catalogs will cause an error await client.DeleteCatalogs(new[] { MachineCatalog.Uuid }); await client.DeleteAttributeDefinitions(EntityDto.Catalog, new[] { MachineName.Key, MachineNumber.Key, MachineVendor.Key }); }