Start modernization

This commit is contained in:
2023-03-10 12:18:03 -05:00
parent a0214b98f1
commit f480a6c373
57 changed files with 661 additions and 2921 deletions

View File

@@ -3,6 +3,7 @@ using System.ComponentModel;
using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using FeedCenter.Data;
namespace FeedCenter
{
@@ -18,10 +19,10 @@ namespace FeedCenter
public bool? Display(Window owner)
{
_database = new FeedCenterEntities();
_database = Database.Entities;
// Create a view and sort it by name
_collectionViewSource = new CollectionViewSource { Source = _database.AllFeeds };
_collectionViewSource = new CollectionViewSource { Source = _database.Feeds };
_collectionViewSource.Filter += HandleCollectionViewSourceFilter;
_collectionViewSource.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
@@ -98,7 +99,7 @@ namespace FeedCenter
private void HandleOkayButtonClick(object sender, RoutedEventArgs e)
{
// Save the actual settings
_database.SaveChanges();
_database.SaveChanges(() => { });
DialogResult = true;