private async Task DeleteTemplateAsync() { try { await TemplateService.DeleteTemplateAsync(Template.Id); await ToastService.ShowToastAsync("Template deleted.", ToastType.Success); await ModalDialogClose(); } catch (Exception ex) { Logger.LogError(ex.Message, ex); await ToastService.ShowToastAsync(ex.Message, ToastType.Error); await ModalDialogCancel(); } }