Contents

init(_:)

Creates a context that belongs to the specified model container.

Declaration

init(_ container: ModelContainer)

Parameters

  • container:

    The model container to associate with the initialized context.

Discussion

Use the context’s container property to access the model container after initializtion.

See Also

Creating a model context