lazy var managedObjectContext: NSManagedObjectContext = {
guard let modelURL = NSBundle.mainBundle().URLForResource("DataModel", withExtension: "momd") else { fatalError("Could not find data model in app bundle")
}
guard let model = NSManagedObjectModel(contentsOfURL: modelURL) else {
fatalError("Error initializing model from \(modelURL)")
}
I am getting error saying that “Cannot convert value of type ‘() → ()’ to specified type ‘NSManagedObjectContext’” I understand that i am passing closure here this is as typed in the book but something is not right any help very welcome