// public event Action<ICollection<Car>> AssignCarsToOwner; public CarsDialog(Owner owner) { receivedOwner = owner; InitializeComponent(); context = new CarOwnerDbContext(); lblOwnerName.Content = owner.Name; RefreshCarsClearFields(); }
public MainWindow() { InitializeComponent(); try { context = new CarOwnerDbContext(); RefreshOwnersClearFields(); } catch (SystemException ex) { MessageBox.Show("Fatal error connecting to database:\n" + ex.Message); Environment.Exit(1); } }