[]
Registers an ObjectContext as a default for C1DataSource controls for a given contextType.
public static IDisposable RegisterContext(ObjectContext context, Type contextType)
| Type | Name | Description |
|---|---|---|
| ObjectContext | context | An ObjectContext to set as default. |
| Type | contextType | The type (derived from ObjectContext) to register the |
| Type | Description |
|---|---|
| IDisposable | An IDisposable to unregister the |
Use this method when you need to customize the default ObjectContext used in C1DataSource controls. Register a custom ObjectContext on startup before any C1DataSource instances are created.
| Type | Condition |
|---|---|
| InvalidOperationException | Another context is already registered for the given |
Registers an ObjectContext as a default for C1DataSource controls.
public static IDisposable RegisterContext(ObjectContext context)
| Type | Name | Description |
|---|---|---|
| ObjectContext | context | An ObjectContext to set as default. |
| Type | Description |
|---|---|
| IDisposable | An IDisposable to unregister the |
Use this method when you need to customize the default ObjectContext used in C1DataSource controls. Register a custom ObjectContext on startup before any C1DataSource instances are created.
| Type | Condition |
|---|---|
| InvalidOperationException | Another context is already registered. |
Registers an DbContext as a default for C1DataSource controls for a given contextType.
public static IDisposable RegisterContext(DbContext context, Type contextType)
| Type | Name | Description |
|---|---|---|
| DbContext | context | An DbContext to set as default. |
| Type | contextType | The type (derived from DbContext) to register the |
| Type | Description |
|---|---|
| IDisposable | An IDisposable to unregister the |
Use this method when you need to customize the default DbContext used in C1DataSource controls. Register a custom DbContext on startup before any C1DataSource instances are created.
| Type | Condition |
|---|---|
| InvalidOperationException | Another context is already registered for the given |
Registers an DbContext as a default for C1DataSource controls.
public static IDisposable RegisterContext(DbContext context)
| Type | Name | Description |
|---|---|---|
| DbContext | context | An DbContext to set as default. |
| Type | Description |
|---|---|
| IDisposable | An IDisposable to unregister the |
Use this method when you need to customize the default DbContext used in C1DataSource controls. Register a custom DbContext on startup before any C1DataSource instances are created.
| Type | Condition |
|---|---|
| InvalidOperationException | Another context is already registered. |