Your
MainWindow
constructor binds the grid to the current records in the database.
Your
BtnSave_Click
method creates a new
MainWindow
instance
before adding the new record to the database.
Therefore, your main window can't show the new record, because it doesn't exist at the point the data was loaded.
Try moving the line that creates the new
MainWindow
instance after the
CreatePerson
call:
private void BtnSave_Click(object sender, RoutedEventArgs e)
{
Person personObject = new Person();
DateTime dateNow = DateTime.Now;
personObject.DateCreated = dateNow;
entityFramework.CreatePerson(personObject);
MessageBox.Show("Created new person.", "Created");
Window mainWindow = new MainWindow();
mainWindow.Show();
Close();
}