diff --git a/YouTubeViewers.EntityFramework/Commands/CreateYouTubeViewerCommand.cs b/YouTubeViewers.EntityFramework/Commands/CreateYouTubeViewerCommand.cs index c74c930..0c2559c 100644 --- a/YouTubeViewers.EntityFramework/Commands/CreateYouTubeViewerCommand.cs +++ b/YouTubeViewers.EntityFramework/Commands/CreateYouTubeViewerCommand.cs @@ -20,6 +20,7 @@ namespace YouTubeViewers.EntityFramework.Commands public async Task Execute(YouTubeViewer youTubeViewer) { + using (YouTubeViewersDbContext context = _contextFactory.Create()) { YouTubeViewerDto youTubeViewerDto = new YouTubeViewerDto() diff --git a/YouTubeViewers.EntityFramework/Commands/DeleteYouTubeViewerCommand.cs b/YouTubeViewers.EntityFramework/Commands/DeleteYouTubeViewerCommand.cs index 52a27d3..bf4819b 100644 --- a/YouTubeViewers.EntityFramework/Commands/DeleteYouTubeViewerCommand.cs +++ b/YouTubeViewers.EntityFramework/Commands/DeleteYouTubeViewerCommand.cs @@ -21,7 +21,6 @@ namespace YouTubeViewers.EntityFramework.Commands { using (YouTubeViewersDbContext context = _contextFactory.Create()) { - await Task.Delay(5000); YouTubeViewerDto youTubeViewerDto = new YouTubeViewerDto() { Id = id, diff --git a/YouTubeViewers.EntityFramework/Commands/UpdateYouTubeViewerCommand.cs b/YouTubeViewers.EntityFramework/Commands/UpdateYouTubeViewerCommand.cs index afc68d9..75ed632 100644 --- a/YouTubeViewers.EntityFramework/Commands/UpdateYouTubeViewerCommand.cs +++ b/YouTubeViewers.EntityFramework/Commands/UpdateYouTubeViewerCommand.cs @@ -20,6 +20,7 @@ namespace YouTubeViewers.EntityFramework.Commands public async Task Execute(YouTubeViewer youTubeViewer) { + using (YouTubeViewersDbContext context = _contextFactory.Create()) { YouTubeViewerDto youTubeViewerDto = new YouTubeViewerDto() diff --git a/YouTubeViewers.WPF/App.xaml b/YouTubeViewers.WPF/App.xaml index 025ae7c..315b465 100644 --- a/YouTubeViewers.WPF/App.xaml +++ b/YouTubeViewers.WPF/App.xaml @@ -8,8 +8,12 @@ - + + + + + + + + + + + - - + - - - + +