ModelBuilder.ApplyConfiguration 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
ApplyConfiguration<TEntity>(IEntityTypeConfiguration<TEntity>) |
Applies configuration that is defined in an IEntityTypeConfiguration<TEntity> instance. |
ApplyConfiguration<TQuery>(IQueryTypeConfiguration<TQuery>) |
Obsolete.
Applies configuration that is defined in an IQueryTypeConfiguration<TQuery> instance. |
ApplyConfiguration<TEntity>(IEntityTypeConfiguration<TEntity>)
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
Applies configuration that is defined in an IEntityTypeConfiguration<TEntity> instance.
public virtual Microsoft.EntityFrameworkCore.ModelBuilder ApplyConfiguration<TEntity> (Microsoft.EntityFrameworkCore.IEntityTypeConfiguration<TEntity> configuration) where TEntity : class;
abstract member ApplyConfiguration : Microsoft.EntityFrameworkCore.IEntityTypeConfiguration<'Entity (requires 'Entity : null)> -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Entity : null)
override this.ApplyConfiguration : Microsoft.EntityFrameworkCore.IEntityTypeConfiguration<'Entity (requires 'Entity : null)> -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Entity : null)
Public Overridable Function ApplyConfiguration(Of TEntity As Class) (configuration As IEntityTypeConfiguration(Of TEntity)) As ModelBuilder
Type Parameters
- TEntity
The entity type to be configured.
Parameters
- configuration
- IEntityTypeConfiguration<TEntity>
The configuration to be applied.
Returns
The same ModelBuilder instance so that additional configuration calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
ApplyConfiguration<TQuery>(IQueryTypeConfiguration<TQuery>)
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
- Source:
- ModelBuilder.cs
Caution
Use IEntityTypeConfiguration<TEntity> instead
Applies configuration that is defined in an IQueryTypeConfiguration<TQuery> instance.
public virtual Microsoft.EntityFrameworkCore.ModelBuilder ApplyConfiguration<TQuery> (Microsoft.EntityFrameworkCore.IQueryTypeConfiguration<TQuery> configuration) where TQuery : class;
[System.Obsolete("Use IEntityTypeConfiguration<TEntity> instead")]
public virtual Microsoft.EntityFrameworkCore.ModelBuilder ApplyConfiguration<TQuery> (Microsoft.EntityFrameworkCore.IQueryTypeConfiguration<TQuery> configuration) where TQuery : class;
abstract member ApplyConfiguration : Microsoft.EntityFrameworkCore.IQueryTypeConfiguration<'Query (requires 'Query : null)> -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Query : null)
override this.ApplyConfiguration : Microsoft.EntityFrameworkCore.IQueryTypeConfiguration<'Query (requires 'Query : null)> -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Query : null)
[<System.Obsolete("Use IEntityTypeConfiguration<TEntity> instead")>]
abstract member ApplyConfiguration : Microsoft.EntityFrameworkCore.IQueryTypeConfiguration<'Query (requires 'Query : null)> -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Query : null)
override this.ApplyConfiguration : Microsoft.EntityFrameworkCore.IQueryTypeConfiguration<'Query (requires 'Query : null)> -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Query : null)
Public Overridable Function ApplyConfiguration(Of TQuery As Class) (configuration As IQueryTypeConfiguration(Of TQuery)) As ModelBuilder
Type Parameters
- TQuery
The query type to be configured.
Parameters
- configuration
- IQueryTypeConfiguration<TQuery>
The configuration to be applied.
Returns
The same ModelBuilder instance so that additional configuration calls can be chained.
- Attributes
Applies to
Entity Framework