RelationalElementTypeBuilderExtensions.HasStoreType 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
HasStoreType(ElementTypeBuilder, String) |
Configures the data type of the elements of the collection. |
HasStoreType(IConventionElementTypeBuilder, String, Boolean) |
Configures the data type of the elements of the collection. |
HasStoreType(ElementTypeBuilder, String)
Configures the data type of the elements of the collection.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder HasStoreType (this Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder elementTypeBuilder, string? typeName);
static member HasStoreType : Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ElementTypeBuilder
<Extension()>
Public Function HasStoreType (elementTypeBuilder As ElementTypeBuilder, typeName As String) As ElementTypeBuilder
Parameters
- elementTypeBuilder
- ElementTypeBuilder
The builder for the elements being configured.
- typeName
- String
The name of the data type of the elements.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
HasStoreType(IConventionElementTypeBuilder, String, Boolean)
Configures the data type of the elements of the collection.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder? HasStoreType (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder elementTypeBuilder, string? typeName, bool fromDataAnnotation = false);
static member HasStoreType : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionElementTypeBuilder
<Extension()>
Public Function HasStoreType (elementTypeBuilder As IConventionElementTypeBuilder, typeName As String, Optional fromDataAnnotation As Boolean = false) As IConventionElementTypeBuilder
Parameters
- elementTypeBuilder
- IConventionElementTypeBuilder
builder for the elements being configured.
- typeName
- String
The name of the data type of the elements.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the configuration was applied, null
otherwise.
Remarks
See Modeling entity types and relationships for more information and examples.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for