RelationalConnectionDependencies.With Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
With(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>) |
Clones this dependency parameter object with one service replaced. |
With(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>) |
Clones this dependency parameter object with one service replaced. |
With(ICurrentDbContext) |
Clones this dependency parameter object with one service replaced. |
With(IDbContextOptions) |
Clones this dependency parameter object with one service replaced. |
With(INamedConnectionStringResolver) |
Clones this dependency parameter object with one service replaced. |
With(IRelationalTransactionFactory) |
Clones this dependency parameter object with one service replaced. |
With(IDiagnosticsLogger<DbLoggerCategory.Database.Connection>)
Clones this dependency parameter object with one service replaced.
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
Parameters
- connectionLogger
- IDiagnosticsLogger<DbLoggerCategory.Database.Connection>
A replacement for the current dependency of this type.
Returns
A new parameter object with the given service replaced.
Applies to
With(IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>)
Clones this dependency parameter object with one service replaced.
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
Parameters
- transactionLogger
- IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>
A replacement for the current dependency of this type.
Returns
A new parameter object with the given service replaced.
Applies to
With(ICurrentDbContext)
Clones this dependency parameter object with one service replaced.
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
Parameters
- currentContext
- ICurrentDbContext
A replacement for the current dependency of this type.
Returns
A new parameter object with the given service replaced.
Applies to
With(IDbContextOptions)
Clones this dependency parameter object with one service replaced.
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
Parameters
- contextOptions
- IDbContextOptions
A replacement for the current dependency of this type.
Returns
A new parameter object with the given service replaced.
Applies to
With(INamedConnectionStringResolver)
Clones this dependency parameter object with one service replaced.
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
Parameters
- connectionStringResolver
- Microsoft.EntityFrameworkCore.Storage.Internal.INamedConnectionStringResolver
A replacement for the current dependency of this type.
Returns
A new parameter object with the given service replaced.
- Attributes
Applies to
With(IRelationalTransactionFactory)
Clones this dependency parameter object with one service replaced.
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
Parameters
- relationalTransactionFactory
- IRelationalTransactionFactory
A replacement for the current dependency of this type.
Returns
A new parameter object with the given service replaced.
Applies to
Entity Framework