public static async Task Run(GeotabDataOnlyPlanAPI api, string driverChangeId) { ConsoleUtility.LogExampleStarted(typeof(RemoveDriverChangeAsyncExample).Name); try { ConsoleUtility.LogInfoStart($"Removing driverChange '{driverChangeId}' from database '{api.Credentials.Database}'..."); IList <DriverChange> driverChanges = await ExampleUtility.GetAllDriverChangesAsync(api); DriverChange driverChangeToRemove = driverChanges.Where(targetDriverChange => targetDriverChange.Id.ToString() == driverChangeId).First(); await api.RemoveDriverChangeAsync(driverChangeToRemove); ConsoleUtility.LogComplete(); } catch (Exception ex) { ConsoleUtility.LogError(ex); } ConsoleUtility.LogExampleFinished(typeof(RemoveDriverChangeAsyncExample).Name); }