Provides helper extension methods for the IServiceProvider
Gets from the dependency injection container the IDataService for the specifed dataModelType.
public IDataService GetDataServiceForDataModel(provider, dataModelType)
The IDataService for the dataModelType or null if it cannot be found.
Name | Type | Summary |
---|---|---|
provider | IServiceProvider | The IServiceProvider. |
dataModelType | Type | The Type of an IDataModel. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when provider is null. -or- When dataModelType is null. |
InvalidOperationException | Thrown when dataModelType is not an IDataModel. -or- When a configured type is not registered within the dependency injection container. |
Gets from the dependency injection container an IDbAccess service with the specified name.
public IDbAccess GetDbAccessRequiredService(provider, name)
An IDbAccess service for the specified name.
Name | Type | Summary |
---|---|---|
provider | IServiceProvider | The IServiceProvider. |
name | String | The name of the service to get. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when provider is null. |
ArgumentException | Thrown when name is null or empty. |
InvalidOperationException | Thrown when there is no IDbAccess service with the specified name. |
Gets from the dependency injection container an IDbCmdBuilder service with the specified name.
public IDbCmdBuilder GetDbCmdBuilderRequiredService(provider, name)
An IDbCmdBuilder service for the specified name.
Name | Type | Summary |
---|---|---|
provider | IServiceProvider | The IServiceProvider. |
name | String | The name of the service to get. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when provider is null. |
ArgumentException | Thrown when name is null or empty. |
InvalidOperationException | Thrown when there is no IDbCmdBuilder service with the specified name. |
Gets from the dependency injection container an ISchemaDiscoverer service with the specified name.
public ISchemaDiscoverer GetSchemaDiscovererRequiredService(provider, name)
An ISchemaDiscoverer service for the specified name.
Name | Type | Summary |
---|---|---|
provider | IServiceProvider | The IServiceProvider. |
name | String | The name of the service to get. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when provider is null. |
ArgumentException | Thrown when name is null or empty. |
InvalidOperationException | Thrown when there is no ISchemaDiscoverer service with the specified name. |
Gets from the dependency injection container an ISchemaProvisioner service with the specified name.
public ISchemaProvisioner GetSchemaProvisionerRequiredService(provider, name)
An ISchemaProvisioner service for the specified name.
Name | Type | Summary |
---|---|---|
provider | IServiceProvider | The IServiceProvider. |
name | String | The name of the service to get. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when provider is null. |
ArgumentException | Thrown when name is null or empty. |
InvalidOperationException | Thrown when there is no ISchemaProvisioner service with the specified name. |
Gets from the dependency injection container an IViewBuilder service with the specified name.
public IViewBuilder GetViewBuilderRequiredService(provider, name)
An IViewBuilder service for the specified name.
Name | Type | Summary |
---|---|---|
provider | IServiceProvider | The IServiceProvider. |
name | String | The name of the service to get. |
Type | Summary |
---|---|
ArgumentNullException | Thrown when provider is null. |
ArgumentException | Thrown when name is null or empty. |
InvalidOperationException | Thrown when there is no IViewBuilder service with the specified name. |