Share via


BinaryPropertyConfiguration.HasDatabaseGeneratedOption Method

Definition

Overloads

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.

public System.Data.Entity.ModelConfiguration.Configuration.BinaryPropertyConfiguration HasDatabaseGeneratedOption (Nullable<System.ComponentModel.DataAnnotations.DatabaseGeneratedOption> databaseGeneratedOption);
override this.HasDatabaseGeneratedOption : Nullable<System.ComponentModel.DataAnnotations.DatabaseGeneratedOption> -> System.Data.Entity.ModelConfiguration.Configuration.BinaryPropertyConfiguration
Public Function HasDatabaseGeneratedOption (databaseGeneratedOption As Nullable(Of DatabaseGeneratedOption)) As BinaryPropertyConfiguration

Parameters

databaseGeneratedOption
Nullable<DatabaseGeneratedOption>

The pattern used to generate values for the property in the database. Setting 'null' will remove the database generated pattern facet from the property. Setting 'null' will cause the same runtime behavior as specifying 'None'.

Returns

The same BinaryPropertyConfiguration instance so that multiple calls can be chained.

Applies to

HasDatabaseGeneratedOption(Nullable<DatabaseGeneratedOption>)

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

public System.Data.Entity.ModelConfiguration.Configuration.BinaryPropertyConfiguration HasDatabaseGeneratedOption (Nullable<System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption> databaseGeneratedOption);
override this.HasDatabaseGeneratedOption : Nullable<System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption> -> System.Data.Entity.ModelConfiguration.Configuration.BinaryPropertyConfiguration
Public Function HasDatabaseGeneratedOption (databaseGeneratedOption As Nullable(Of DatabaseGeneratedOption)) As BinaryPropertyConfiguration

Parameters

databaseGeneratedOption
Nullable<DatabaseGeneratedOption>

The pattern used to generate values for the property in the database. Setting 'null' will cause the default option to be used, which may be 'None', 'Identity', or 'Computed' depending on the type of the property, its semantics in the model (e.g. primary keys are treated differently), and which set of conventions are being used.

Returns

The same BinaryPropertyConfiguration instance so that multiple calls can be chained.

Applies to