/// <summary> /// Configures the default seed for SQL Server IDENTITY. /// </summary> /// <param name="modelBuilder"> The model builder. </param> /// <param name="seed"> The value that is used for the very first row loaded into the table. </param> /// <param name="fromDataAnnotation"> Indicates whether the configuration was specified using a data annotation. </param> /// <returns> /// The same builder instance if the configuration was applied, /// <c>null</c> otherwise. /// </returns> public static IConventionModelBuilder HasIdentityColumnSeed( [NotNull] this IConventionModelBuilder modelBuilder, int?seed, bool fromDataAnnotation = false) { if (modelBuilder.CanSetIdentityColumnSeed(seed, fromDataAnnotation)) { modelBuilder.Metadata.SetIdentitySeed(seed, fromDataAnnotation); return(modelBuilder); } return(null); }