CoreData: Add Data

In an alert view:

 let action = UIAlertAction(title: "Save", style: .default) { (_) in
            let name = alert.textFields!.first!.text!
            let age = alert.textFields!.last!.text!

//            fill container
            let person = Person(context: persistenceService.context)
            person.name = name
            person.age = Int16(age)!

//            save container
            persistenceService.saveContext()
            self.people.append(person)

        self.tableView.reloadData()

    }