Table of Contents

Interface IConventionServicePropertyBuilder

Namespace
Microsoft.EntityFrameworkCore.Metadata.Builders
Assembly
Microsoft.EntityFrameworkCore.dll

Provides a simple API surface for configuring an IConventionServiceProperty from conventions.

This interface is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IConventionServicePropertyBuilder : IConventionPropertyBaseBuilder<IConventionServicePropertyBuilder>, IConventionAnnotatableBuilder
Inherited Members

Remarks

See Model building conventions for more information and examples.

Properties

Metadata

Gets the service property being configured.

IConventionServiceProperty Metadata { get; }

Property Value

IConventionServiceProperty

Methods

CanSetParameterBinding(ServiceParameterBinding?, bool)

Returns a value indicating whether the ServiceParameterBinding can be set for this property. from the current configuration source.

bool CanSetParameterBinding(ServiceParameterBinding? parameterBinding, bool fromDataAnnotation = false)

Parameters

parameterBinding ServiceParameterBinding

The parameter binding.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool

true if the ServiceParameterBinding can be set for this property.

HasParameterBinding(ServiceParameterBinding?, bool)

Sets the ServiceParameterBinding for this property.

IConventionServicePropertyBuilder? HasParameterBinding(ServiceParameterBinding? parameterBinding, bool fromDataAnnotation = false)

Parameters

parameterBinding ServiceParameterBinding

The parameter binding.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionServicePropertyBuilder

The same builder instance if the configuration was applied, null otherwise.