IConventionEntityTypeBuilder.CreateUniqueProperty 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.
Creates a property with a name that's different from any existing properties.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder CreateUniqueProperty (Type propertyType, string basePropertyName, bool required);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? CreateUniqueProperty (Type propertyType, string basePropertyName, bool required);
abstract member CreateUniqueProperty : Type * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
Public Function CreateUniqueProperty (propertyType As Type, basePropertyName As String, required As Boolean) As IConventionPropertyBuilder
Parameters
- propertyType
- Type
The type of value the property will hold.
- basePropertyName
- String
The desired property name.
- required
- Boolean
A value indicating whether the property is required.
Returns
An object that can be used to configure the property if it exists on the entity type,
null
otherwise.
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