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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework