ManagedContext constructor
ManagedContext(
- ManagedDataModel? dataModel,
- PersistentStore? persistentStore
Creates an instance of ManagedContext from a ManagedDataModel and PersistentStore.
This is the default constructor.
A Query is sent to the database described by persistentStore. A Query may only be executed on this context if its type is in dataModel.
Implementation
ManagedContext(this.dataModel, this.persistentStore) {
ManagedDataModelManager.add(dataModel!);
ServiceRegistry.defaultInstance
.register<ManagedContext>(this, (o) => o.close());
}