Done with CoreData working. Saving, updating and deleting are working correct now

This commit is contained in:
Vladimir Dubovik
2025-01-21 14:54:24 +03:00
parent b4704bd4fc
commit 3eb5fb73eb
4 changed files with 34 additions and 29 deletions

View File

@ -24,7 +24,10 @@ final class ClassProvider {
}
var newContext: NSManagedObjectContext {
persistentContainer.newBackgroundContext()
//persistentContainer.newBackgroundContext()
let context = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType)
context.persistentStoreCoordinator = persistentContainer.persistentStoreCoordinator
return context
}
private init() {