mirror of
https://github.com/rmcrackan/Libation.git
synced 2025-12-23 22:17:52 -05:00
Properly disposed of LibationContext (#1403)
This commit is contained in:
@@ -122,7 +122,8 @@ namespace LibationAvalonia.Dialogs
|
||||
|
||||
private void Reload()
|
||||
{
|
||||
var deletedBooks = DbContexts.GetContext().GetDeletedLibraryBooks();
|
||||
using var context = DbContexts.GetContext();
|
||||
var deletedBooks = context.GetDeletedLibraryBooks();
|
||||
|
||||
DeletedBooks.Clear();
|
||||
DeletedBooks.AddRange(deletedBooks.Select(lb => new CheckBoxViewModel { Item = lb }));
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace LibationWinForms.Dialogs
|
||||
|
||||
deletedCheckedTemplate = deletedCheckedLbl.Text;
|
||||
|
||||
var deletedBooks = DbContexts.GetContext().GetDeletedLibraryBooks();
|
||||
using var context = DbContexts.GetContext();
|
||||
var deletedBooks = context.GetDeletedLibraryBooks();
|
||||
foreach (var lb in deletedBooks)
|
||||
deletedCbl.Items.Add(lb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user