StringPropertyConfiguration Class

Definition

Used to configure a System.string property of an entity type or complex type. This configuration functionality is available via the Code First Fluent API, see DbModelBuilder.

public class StringPropertyConfiguration : System.Data.Entity.ModelConfiguration.Configuration.LengthPropertyConfiguration
type StringPropertyConfiguration = class
    inherit LengthPropertyConfiguration
Public Class StringPropertyConfiguration
Inherits LengthPropertyConfiguration
Inheritance

Methods

Equals(Object)
Equals(Object) (Inherited from LengthPropertyConfiguration)
GetHashCode()
GetHashCode() (Inherited from LengthPropertyConfiguration)
GetType()
GetType() (Inherited from LengthPropertyConfiguration)
HasColumnAnnotation(String, Object)

Sets an annotation in the model for the database column used to store the property. The annotation value can later be used when processing the column such as when creating migrations.

HasColumnAnnotation(String, Object)

Sets an annotation in the model for the database column used to store the property. The annotation value can later be used when processing the column such as when creating migrations.

(Inherited from PrimitivePropertyConfiguration)
HasColumnName(String)

Configures the name of the database column used to store the property.

HasColumnOrder(Nullable<Int32>)

Configures the order of the database column used to store the property. This method is also used to specify key ordering when an entity type has a composite key.

HasColumnType(String)

Configures the data type of the database column used to store the property.

HasDatabaseGeneratedOption(Nullable<DatabaseGeneratedOption>)

Configures how values for the property are generated by the database.

HasDatabaseGeneratedOption(Nullable<DatabaseGeneratedOption>)

Configures how values for the property are generated by the database.

HasDatabaseGeneratedOption(Nullable<DatabaseGeneratedOption>)

Configures how values for the property are generated by the database.

(Inherited from PrimitivePropertyConfiguration)
HasDatabaseGeneratedOption(Nullable<DatabaseGeneratedOption>)

Configures how values for the property are generated by the database.

(Inherited from PrimitivePropertyConfiguration)
HasMaxLength(Nullable<Int32>)

Configures the property to have the specified maximum length.

HasParameterName(String)

Configures the name of the parameter used in stored procedures for this property.

(Inherited from PrimitivePropertyConfiguration)
IsConcurrencyToken()

Configures the property to be used as an optimistic concurrency token.

IsConcurrencyToken(Nullable<Boolean>)

Configures whether or not the property is to be used as an optimistic concurrency token.

IsFixedLength()

Configures the property to be fixed length. Use HasMaxLength to set the length that the property is fixed to.

IsMaxLength()

Configures the property to allow the maximum length supported by the database provider.

IsOptional()

Configures the property to be optional. The database column used to store this property will be nullable. System.string properties are optional by default.

IsRequired()

Configures the property to be required. The database column used to store this property will be non-nullable.

IsUnicode()

Configures the property to support Unicode string content.

IsUnicode(Nullable<Boolean>)

Configures whether or not the property supports Unicode string content.

IsVariableLength()

Configures the property to be variable length. System.string properties are variable length by default.

ToString()
ToString() (Inherited from LengthPropertyConfiguration)

Applies to