         self = .binaryStore(at: url)
     }
     
+    public init(memoryStoreNamed resourceName: String, with resourceExtension: String = "memory", in location: Location = .defaultDirectory) throws {
+        let url = try CoreDataStoreInformation.url(for: resourceName, extension: resourceExtension, location: location)
+        self =  .inMemoryStore(at: url)
+    }
+    
     var type: String {
         switch self {
         case .binaryStore: return NSBinaryStoreType
         case .sqliteStore: return NSSQLiteStoreType
+        case .inMemoryStore: return NSInMemoryStoreType
         }
     }
     

        let storeCoordinator = NSPersistentStoreCoordinator(managedObjectModel: NSManagedObjectModel())
        try storeCoordinator.destroyPersistentStore(at: url, ofType: type, options: nil)
        
        if case .sqliteStore = self {
            // attempt to delete sqlite file and assocaited -wal and -shm files
            try deleteFileIfExists(fileUrl: url)

                    object = try context.existingObject(with: self.objectID) as? ManagedObjectType
                }
                    // catch error from loading object from id
                catch { print(error) }
            }
        }
            // catch error from saving original context
        catch { print(error) }
        
        // if everything has gone without error, this will be the `this` object
        // loaded in the new context, otherwise it will be `nil`
