Share via


DateTimePropertyConfiguration.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.DateTimePropertyConfiguration HasDatabaseGeneratedOption (Nullable<System.ComponentModel.DataAnnotations.DatabaseGeneratedOption> databaseGeneratedOption);
override this.HasDatabaseGeneratedOption : Nullable<System.ComponentModel.DataAnnotations.DatabaseGeneratedOption> -> System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration
Public Function HasDatabaseGeneratedOption (databaseGeneratedOption As Nullable(Of DatabaseGeneratedOption)) As DateTimePropertyConfiguration

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 DateTimePropertyConfiguration 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.DateTimePropertyConfiguration HasDatabaseGeneratedOption (Nullable<System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption> databaseGeneratedOption);
override this.HasDatabaseGeneratedOption : Nullable<System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption> -> System.Data.Entity.ModelConfiguration.Configuration.DateTimePropertyConfiguration
Public Function HasDatabaseGeneratedOption (databaseGeneratedOption As Nullable(Of DatabaseGeneratedOption)) As DateTimePropertyConfiguration

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 DateTimePropertyConfiguration instance so that multiple calls can be chained.

Applies to