Files
elwig/Elwig/Windows/ContextWindow.cs

24 lines
548 B
C#

using Elwig.Helpers;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace Elwig.Windows {
public abstract class ContextWindow : Window {
protected readonly AppDbContext Context;
public ContextWindow() : base() {
Context = new();
}
protected override void OnClosing(CancelEventArgs evt) {
Context.Dispose();
base.OnClosing(evt);
}
}
}