SqlServerConventionSetBuilder Class
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.
A builder for building conventions for SQL Server.
public class SqlServerConventionSetBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalConventionSetBuilder
public class SqlServerConventionSetBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.RelationalConventionSetBuilder
type SqlServerConventionSetBuilder = class
inherit RelationalConventionSetBuilder
Public Class SqlServerConventionSetBuilder
Inherits RelationalConventionSetBuilder
- Inheritance
-
Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalConventionSetBuilderSqlServerConventionSetBuilder
- Inheritance
Remarks
The service lifetime is Scoped and multiple registrations are allowed. This means that each DbContext instance will use its own set of instances of this service. The implementations may depend on other services registered with any lifetime. The implementations do not need to be thread-safe.
See Model building conventions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.
Constructors
SqlServerConventionSetBuilder(IRelationalTypeMapper, ICurrentDbContext, IDbSetFinder) | |
SqlServerConventionSetBuilder(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies, ISqlGenerationHelper) |
Creates a new SqlServerConventionSetBuilder instance. |
SqlServerConventionSetBuilder(RelationalConventionSetBuilderDependencies, ISqlGenerationHelper) |
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases. |
Properties
Dependencies |
Dependencies for this service. (Inherited from ProviderConventionSetBuilder) |
RelationalDependencies |
Relational provider-specific dependencies for this service. (Inherited from RelationalConventionSetBuilder) |
Methods
AddConventions(ConventionSet) |
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases. |
Build() |
Call this method to build a ConventionSet for SQL Server when using the ModelBuilder outside of OnModelCreating(ModelBuilder). |
CreateConventionSet() |
Builds and returns the convention set for the current database provider. |
CreateModelBuilder() |
Call this method to build a ModelBuilder for SQL Server outside of OnModelCreating(ModelBuilder). |
ReplaceConvention<TConvention,TImplementation>(IList<TConvention>, TImplementation) |
Replaces an existing convention with a derived convention. (Inherited from ProviderConventionSetBuilder) |
ReplaceConvention<TConvention,TImplementation>(List<TConvention>, TImplementation) |
Replaces an existing convention with a derived convention. (Inherited from ProviderConventionSetBuilder) |
Applies to
Entity Framework