IMutableEntityType.AddProperty Method

Definition

Overloads

AddProperty(String, Type, MemberInfo)

Adds a property to this entity type.

AddProperty(String, Type)

Adds a property to this entity type.

AddProperty(String, Type, Boolean)

Adds a property to this entity.

AddProperty(MemberInfo)

Adds a property to this entity type.

AddProperty(String)

Adds a property to this entity type.

AddProperty(String, Type, MemberInfo)

Adds a property to this entity type.

public Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (string name, Type propertyType, System.Reflection.MemberInfo memberInfo);
public Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (string name, Type propertyType, System.Reflection.MemberInfo? memberInfo);
abstract member AddProperty : string * Type * System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
Public Function AddProperty (name As String, propertyType As Type, memberInfo As MemberInfo) As IMutableProperty

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of value the property will hold.

memberInfo
MemberInfo

The corresponding CLR type member or null for a shadow property.

An indexer with a String parameter and Object return type can be used.

Returns

The newly created property.

Applies to

AddProperty(String, Type)

Adds a property to this entity type.

public Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (string name, Type propertyType);
abstract member AddProperty : string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
Public Function AddProperty (name As String, propertyType As Type) As IMutableProperty

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of value the property will hold.

Returns

The newly created property.

Applies to

AddProperty(String, Type, Boolean)

Adds a property to this entity.

public Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (string name, Type propertyType, bool shadow);
abstract member AddProperty : string * Type * bool -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
Public Function AddProperty (name As String, propertyType As Type, shadow As Boolean) As IMutableProperty

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of value the property will hold.

shadow
Boolean

Whether the property is in shadow-state.

Returns

The newly created property.

Applies to

AddProperty(MemberInfo)

Adds a property to this entity type.

public virtual Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (System.Reflection.MemberInfo memberInfo);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Currently used only in tests")]
public virtual Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (System.Reflection.MemberInfo memberInfo);
abstract member AddProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
override this.AddProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Currently used only in tests")>]
abstract member AddProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
override this.AddProperty : System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
Public Overridable Function AddProperty (memberInfo As MemberInfo) As IMutableProperty

Parameters

memberInfo
MemberInfo

The corresponding member on the entity class.

Returns

The newly created property.

Attributes

Applies to

AddProperty(String)

Adds a property to this entity type.

public Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (string name);
abstract member AddProperty : string -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
Public Function AddProperty (name As String) As IMutableProperty

Parameters

name
String

The name of the property to add.

Returns

The newly created property.

Applies to