SqlServerConventionSetBuilder Class

Definition

A builder for building conventions for SQL Server.

C#
public class SqlServerConventionSetBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalConventionSetBuilder
C#
public class SqlServerConventionSetBuilder : Microsoft.EntityFrameworkCore.Metadata.Conventions.Infrastructure.RelationalConventionSetBuilder
Inheritance
Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RelationalConventionSetBuilder
SqlServerConventionSetBuilder
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

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

Proizvod Verzije
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0