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
取代此類型的目前相依性。
傳回
取代指定服務的新參數物件。