andrewcbancroft.com
A Swift Implementation of the Core Data Stack Using NSPersistentContainer - Andrew Bancroft
If you want to write a few less lines of code and keep up-to-date with the latest Core Data enhancements, read to learn more about NSPersistentContainer!