private static async Task DeleteProject(TrainingApi trainingApi, Guid projectId) { Console.Clear(); await trainingApi.DeleteProjectAsync(projectId); Console.WriteLine("Project deleted... Press any key to continue"); Console.ReadLine(); }
private async Task DeleteProjectAsync() { try { await trainingApi.DeleteProjectAsync(this.CurrentProject.Id); this.Projects.Remove(this.CurrentProject); this.TagsInCurrentGroup.Clear(); this.SelectedTagImages.Clear(); this.needsTraining = false; } catch (Exception ex) { await Util.GenericApiCallExceptionHandler(ex, "Failure deleting project"); } }