src/Shared/EntityFramework/ModelConfiguration/Configuration/Properties/Primitive/Api/PrimitivePropertyConfiguration.cs
/// <summary>
/// Configures how values for the property are generated by the database.
/// </summary>
/// <param name="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.
/// </param>
/// <returns> The same PrimitivePropertyConfiguration instance so that multiple calls can be chained. </returns>
Configures how values for the property are generated by the database.
Configures how values for the property are generated by the database .
public PrimitivePropertyConfiguration HasDatabaseGeneratedOption(
            DatabaseGeneratedOption? databaseGeneratedOption)
        {
            if (!((databaseGeneratedOption == null)
                  || Enum.IsDefined(typeof(DatabaseGeneratedOption), databaseGeneratedOption)))
            {
                throw new ArgumentOutOfRangeException("databaseGeneratedOption");
            }
            Configuration.DatabaseGeneratedOption = databaseGeneratedOption;
            return this;
        }
public PrimitivePropertyConfiguration HasDatabaseGeneratedOption ( DatabaseGeneratedOption ? databaseGeneratedOption ) { if ( ! ( ( databaseGeneratedOption == null ) || Enum . IsDefined ( typeof ( DatabaseGeneratedOption ) , databaseGeneratedOption ) ) ) { throw new ArgumentOutOfRangeException ( " " ) ; } Configuration . DatabaseGeneratedOption = databaseGeneratedOption ; return this ; }
Configures how values for the property are generated by the database.
Configures how values for the property are generated by the database .
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained.
The same PrimitivePropertyConfiguration instance so that multiple calls can be chained .
databaseGeneratedOption
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 , and which
set of conventions are being used.
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 and which set of conventions are being used .