'Declaration
Public ReadOnly Property ReadOnlyDataContext As DataContext
public DataContext ReadOnlyDataContext {get;}
public: property DataContext^ ReadOnlyDataContext { DataContext^ get(); }
'Declaration
Public ReadOnly Property ReadOnlyDataContext As DataContext
public DataContext ReadOnlyDataContext {get;}
public: property DataContext^ ReadOnlyDataContext { DataContext^ get(); }
The ReadOnlyContext can be used for fetching reference data and fetching object stubs. Objects fetched through the read-only context cannot be modified: to edit an object you must fetch it through a new context first.
Attempting to modify an object returned from the read-only context will product a ReadOnlyException.
Objects fetched through the read-only context can be referenced by objects in other DataContexts (e.g., the Job.Group property can be set to a group fetched from the read-only context, even though cross-context references are normally not allowed.