RelationalConnectionDependencies.With 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
With(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>) |
克隆此依赖项参数对象,并替换了一个服务。 |
With(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>) |
克隆此依赖项参数对象,并替换了一个服务。 |
With(ICurrentDbContext) |
克隆此依赖项参数对象,并替换了一个服务。 |
With(IDbContextOptions) |
克隆此依赖项参数对象,并替换了一个服务。 |
With(INamedConnectionStringResolver) |
克隆此依赖项参数对象,并替换了一个服务。 |
With(IRelationalTransactionFactory) |
克隆此依赖项参数对象,并替换了一个服务。 |
With(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>)
克隆此依赖项参数对象,并替换了一个服务。
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> connectionLogger);
member this.With : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Connection> -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
Public Function With (connectionLogger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Connection)) As RelationalConnectionDependencies
参数
- connectionLogger
- IDiagnosticsLogger<DbLoggerCategory.Database.Connection>
此类型的当前依赖项的替代项。
返回
替换了给定服务的新参数对象。
适用于
With(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>)
克隆此依赖项参数对象,并替换了一个服务。
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> transactionLogger);
member this.With : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
Public Function With (transactionLogger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction)) As RelationalConnectionDependencies
参数
- transactionLogger
- IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>
此类型的当前依赖项的替代项。
返回
替换了给定服务的新参数对象。
适用于
With(ICurrentDbContext)
克隆此依赖项参数对象,并替换了一个服务。
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext currentContext);
member this.With : Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
Public Function With (currentContext As ICurrentDbContext) As RelationalConnectionDependencies
参数
- currentContext
- ICurrentDbContext
此类型的当前依赖项的替代项。
返回
替换了给定服务的新参数对象。
适用于
With(IDbContextOptions)
克隆此依赖项参数对象,并替换了一个服务。
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions);
member this.With : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
Public Function With (contextOptions As IDbContextOptions) As RelationalConnectionDependencies
参数
- contextOptions
- IDbContextOptions
此类型的当前依赖项的替代项。
返回
替换了给定服务的新参数对象。
适用于
With(INamedConnectionStringResolver)
克隆此依赖项参数对象,并替换了一个服务。
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Storage.Internal.INamedConnectionStringResolver connectionStringResolver);
[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Storage.Internal.INamedConnectionStringResolver connectionStringResolver);
member this.With : Microsoft.EntityFrameworkCore.Storage.Internal.INamedConnectionStringResolver -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
member this.With : Microsoft.EntityFrameworkCore.Storage.Internal.INamedConnectionStringResolver -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
Public Function With (connectionStringResolver As INamedConnectionStringResolver) As RelationalConnectionDependencies
参数
- connectionStringResolver
- Microsoft.EntityFrameworkCore.Storage.Internal.INamedConnectionStringResolver
此类型的当前依赖项的替代项。
返回
替换了给定服务的新参数对象。
- 属性
适用于
With(IRelationalTransactionFactory)
克隆此依赖项参数对象,并替换了一个服务。
public Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies With (Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionFactory relationalTransactionFactory);
member this.With : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionFactory -> Microsoft.EntityFrameworkCore.Storage.RelationalConnectionDependencies
Public Function With (relationalTransactionFactory As IRelationalTransactionFactory) As RelationalConnectionDependencies
参数
- relationalTransactionFactory
- IRelationalTransactionFactory
此类型的当前依赖项的替代项。
返回
替换了给定服务的新参数对象。