 extension NSManagedObjectContext {
     
     private func _save() -> NSError? {
-
+        
         if !self.hasChanges {
             return nil
         }
-
+        
         var error: NSError? = nil
         if (!self.save(&error)) {
             #if DEBUG

    }

    public class func delete(predicate: NSPredicate, context: NSManagedObjectContext = CoreDataManager.sharedInstance.mainContext) {
        let request = self.fetchRequest(predicate, context: context)
        request.includesPropertyValues = false

        if let objects = context.executeFetchRequest(request, error: nil) {

            #endif
            return error
        }
        
        return nil
    }
    
    public func saveWithBlock(block: (NSManagedObjectContext)->()) {
        self.performBlockAndWait({
            block(self)
            if let error = self._save() {
                #if DEBUG
                #endif
            }
        })
    }
    
    public func saveAsynchronouslyWithBlock(block: (NSManagedObjectContext)->()){
        self.performBlock({
            block(self)
            if let error = self._save() {
                #if DEBUG
                #endif
            }
        })
    }
    
}
