Application ready before dependency injction
This commit is contained in:
@ -24,6 +24,7 @@ namespace YouTubeViewers.WPF.Commands
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
{
|
||||
YouTubeViewerDetailsFormViewModel formViewModel = _addYouTubeViewerViewModel.YouTubeViewerDetailsFormViewModel;
|
||||
formViewModel.ErrorMessage = null;
|
||||
formViewModel.IsSubmitting = true;
|
||||
YouTubeViewer youTubeViewer = new YouTubeViewer(
|
||||
Guid.NewGuid(),
|
||||
@ -39,7 +40,7 @@ namespace YouTubeViewers.WPF.Commands
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
formViewModel.ErrorMessage = "Failed to add YouTube Viewer. Please try again later.";
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user