         guard let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)) else { return }
         guard let json = try! JSONSerialization.jsonObject(with: data, options: []) as? [[String: Any]] else { return }
 
-        self.persistentContainer.sync(json, inEntityNamed: User.entity().name!) { error in
+        self.dataStack.sync(json, inEntityNamed: User.entity().name!) { error in
             completion(.success)
         }
     }

            switch result {
            case .success(let response):
                let usersJSON = response.arrayBody
                self.persistentContainer.sync(usersJSON, inEntityNamed: User.entity().name!) { error in
                    completion(.success)
                }
            case .failure(let response):

import Alamofire

class Fetcher {
    private let dataStack: DataStack

    private lazy var networking: Networking = {
        Networking(baseURL: "https://jsonplaceholder.typicode.com")
    }()

    init() {
        self.dataStack = DataStack(modelName: "DataModel")
    }

    func fetchLocalUsers() -> [User] {
        let request: NSFetchRequest<User> = User.fetchRequest()

        return try! self.dataStack.viewContext.fetch(request)
    }

    func syncUsingNetworking(completion: @escaping (_ result: VoidResult) -> ()) {
